Write HTML to string

前端 未结 18 1466
一生所求
一生所求 2020-12-13 00:04

I have code like this. Is there a way to make it easier to write and maintain? Using C# .NET 3.5.

string header(string title)
{
    StringWriter s = new Stri         


        
18条回答
  •  自闭症患者
    2020-12-13 00:28

    If you're looking to create an HTML document similar to how you would create an XML document in C#, you could try Microsoft's open source library, the Html Agility Pack.

    It provides an HtmlDocument object that has a very similar API to the System.Xml.XmlDocument class.

提交回复
热议问题