You may do this in two steps.
1) Read content from HTML file. -
Either you can read content of your HTML file using
WebClient()
.
client = new WebClient();
String htmlString = client.DownloadString("MyFile.htm");
Or using
StreamReader
.
String htmlString = String.Emtpy;
using( StreamReader reader = new StreamReader( @"MyHtmlFilePath" ) )
{
htmlString = reader.ReadToEnd();
}
2) Then modify your
htmlString
and assign it to
WebBrowser Control using
DocumentText
Property. Have a look at below link for more information on this.
http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.documenttext.aspx
I also found below link interesting.
http://geekswithblogs.net/dotnetnomad/archive/2008/01/29/119065.aspx
Update - Since you updated your Question.
Quote:
I suppose it must be done with the help of php, but i dont know it.
Why you need PHP for this? You can modify/manupulate your HTML sting using simple
StringBuilder
or using "
Html Agility Pack".
http://htmlagilitypack.codeplex.com/