this tips can help you.StreamReader is used to read
the file and store data in Stringbuilder.you can modify
the Stringbuilder according to your need.
Here the following method does that.the html file with
location is passed to the method.after getting the
content of the html file in StringBuilder,the method
returns it.then you can write back the content to the
html file again.
public static System.Text.StringBuilder ReadHtmlFile(string htmlFileNameWithPath)
{
System.Text.StringBuilder storeContent = new System.Text.StringBuilder();
try
{
using (System.IO.StreamReader htmlReader = new System.IO.StreamReader(htmlFileNameWithPath))
{
string lineStr;
while ((lineStr = htmlReader.ReadLine()) != null)
{
storeContent.Append(lineStr);
}
}
}
catch (Exception objError)
{
throw objError;
}
return storeContent;
}
If you have any kind of questions on this post or any topic, post your questions in
discussions/forum page in this website.Â
I also provide services on php, wordpress, joomla, codeigniter. If you need experts then hire me here -Â https://www.fiverr.com/share/0XozLÂ
Â