In this article, you will learn how to create or edit PowerPoint presentations in ASP.NET applications. The article will explicitly cover how to add a slide, title, background, text, shape, and images in a PowerPoint presentation. To achieve this, we will use Aspose.Slides for .NET, which is a presentation manipulation API to create, edit, and convert PowerPoint and OpenOffice files.
Create a PowerPoint Presentation in ASP.NET
The following are the steps to create a PowerPoint PPTX file from scratch in an ASP.NET application.
1. Create a new ASP.NET (MVC or Web Forms) web application.
3. Use the following code snippets in your ASP.NET application to create a PowerPoint presentation and add different elements to it.
Create an Instance of Presentation:
Add Slide to Presentation:
Set Slide Background:
Add Title to the Slide:
Add Text to the Slide:
Insert an Image into Slide:
Add a Shape to Slide:
Save PowerPoint Presentation:
Edit a PowerPoint Presentation:
To edit a PowerPoint presentation in ASP.NET, you can simply provide the file name in Presentation’s constructor, as shown in below code sample.
Note: Aspose provides a simple, free online PowerPoint editor.
Complete Source Code:
The following is the complete source code to create a PowerPoint presentation in ASP.NET.
Get a Free API License
You can use Aspose.Slides for .NET without evaluation limitations by requesting a temporary license.
You can also try the online presentation editor, which is based on Aspose.Slides.
In this article, you have learned how to create PowerPoint presentations in ASP.NET applications. You can use the provided code samples in your ASP.NET MVC, Web Forms, or ASP.NET Core applications. In addition, you can visit the documentation to explore other features of Aspose.Slides for .NET. Also, you can feel free to let us know about your queries via our forum.