hello all,
im using the code below now to extract table of contents from a html page. it extracts the data which is available after the <table> tag. but what i need is to get the result which appear as though it appear on that html page. . is it possible. if possible means how can i do that. need help..
the code i ve used is,
private void button1_Click(object sender, EventArgs e)
{
webBrowser1.Navigate(@"d:\samtable.html");
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
string textResult;
foreach (HtmlElement pageElement in webBrowser1.Document.GetElementsByTagName("TABLE"))
{
textResult = pageElement.Children[0].InnerHtml;
this.textBox1.Text = textResult;
}
}
im getting the result in textbox like this.
<TR>
<TD width=210>A</TD>
<TD width=45>B</TD>
<TD width=45>C</TD></TR>
<TR>
<TD width=210>D</TD>
<TD width=45>E</TD>
<TD width=45>F</TD></TR