Create PowerPoint Presentation in ASP.NET

In this article, you will learn how to create or edit PowerPoint PPT PPTX 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 PPT 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.
PowerPoint ASP.NET Application
  1. Install Aspose.Slides for .NET API via NuGet (or direct download DLL and add reference).
Install Aspose.Slides
  1. 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 PPT:

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.

Creating PPT in ASP.NET - Complete Source Code:

The following is the complete source code to create a PowerPoint presentation in ASP.NET.

ASP.NET API to Create PowerPoint PPT - Get a Free License

You can use Aspose.Slides for .NET and create PPT presentations without evaluation limitations by getting a free temporary license.

Create a PowerPoint PPT - Online Demo

You can also try the online presentation editor, which is based on Aspose.Slides.

Conclusion

In this article, you have learned how to create PowerPoint PPTX 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.

See Also