Are you looking for a PowerPoint Viewer to view or embed presentations in your ASP.NET Core web application? If yes, continue to read this article and learn how to create a simple ASP.NET Core PowerPoint Viewer and display PPT/PPTX presentations using C#. So let’s begin.
Features of ASP.NET PowerPoint Viewer
Our ASP.NET PowerPoint Viewer will use Aspose.Slides for .NET API to render the presentation slides as PNG images. Once the slides are rendered, we’ll display them using the Bootstrap Carousel. The following will be features of the application:
- Browse and view PowerPoint (PPT/PPTX) presentations.
- Set the default PowerPoint file to be displayed on page load.
- Slider to navigate between slides.
TIP: You may want to check out a live implementation of viewing operations for presentations.
Steps to Create PowerPoint Viewer in ASP.NET Core
The following are some easy steps to create a PowerPoint Viewer in ASP.NET Core.
1. Create a new ASP.NET Core Web Application in Visual Studio.
2. Open NuGet Package Manager and install Aspose.Slides for .NET package.
3. Create Presentations and Slides folders in wwwroot to keep the PowerPoint files and the rendered slides respectively.
4. Create a new folder with the name “Helpers” in the root folder.
5. Create a new class with the name “Slide” in the “Helpers” folder to store the presentation slides’ information.
6. Open the “HomeController.cs” and replace its code with the following (Update the default PowerPoint file’s name in Index action).
7. Open Views/Home/index.cshtml and replace its content with the following.
8. Build the application and run it in your favorite browser.
ASP.NET PowerPoint Viewer – Demo
See Also
Get a Temporary License for Aspose.Slides for .NET
You can get the temporary license of Aspose.Slides for .NET to avoid trial limitations.