Edit HTML in C#

Powerful cross-platform .NET API for editing HTML using C# code on NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms

Edit HTML using Aspose.Slides

Aspose.Slides for .NET is a powerful .NET library used to manipulate and edit presentations, HTML documents, and other files. You can edit an HTML doc by adding a new line of text to it.

Edit HTML in C#

Using Aspose.Slides for .NET , you can add a new line of text to an HTML document with just a few lines of code.

C# code for editing HTML

using (Presentation pres = new Presentation())
    pres.Slides.RemoveAt(0); // removes default empty slide

    AutoShape shape = (AutoShape)pres.Slides[0].Shapes[0];
    shape.TextFrame.Text = "New text";

    pres.Save("page.html", SaveFormat.Html);

How to edit HTML in C#

  1. Install Aspose.Slides for .NET. See Installation .

  2. Add the library as a reference in your project.

  3. Create an instance of the Presentation class.

  4. Load the HTML document you want to edit.

  5. Add a new line of text.

  6. Save the changed HTML file.

Edit other files

You can also edit files in other formats