Html Agility Pack creating irrelevant characters on save html file in c#
问题 I am working on project using asp.net mvc3 C# . I want to change some html element attributes by c# like width , height etc. I have a simple (_Layout.cshtml) file <html> <head> <link href="@Url.Content("file.css")" rel="stylesheet" type="text/css" /> <body> <a href="#" id="link1" title="@Function.ConfigElement("FacebookLink")" ></a> </body> </head> </html> So i am using html agility pack to load and save this file HtmlDocument doc= new HtmlDocument(); doc.load("_Layout.cshtml"); doc