hello all,
i need to extract table contents from a html page.. in that table one of the column has the links.. i need to extract that link too as of other column elements.. is it possible? i need to extract it and then to store in a database.
actually the code in the html page looks like,
<tr>
<td style="width:100px;">aaaaa</td>
<td>bbbbb</td>
<td>ccccc</td>
<td style="width:75px;">dddddd</td>
<td align="center"> </td>
<td align="center"> </td>
<td align="center"> </td>
<td align="center">
<a id="samid" class="samclass" href="samfile.aspx?id=11111"><img src="images\samimg.png" style="border-width:0px;" /></a>
</td>
</tr>
<tr>
<td style="width:100px;">eeeee</td>
<td>fffff</td>
<td>ggggg</td>
<td style="width:75px;">hhhhh</td>
<td align="center"> </td>
<td align="center"> </td>
<td align="center"> </td>
<td align="center">
<a id="samid1" class="samclass" href="samfile.aspx?id=22222"><img src="images\samimg.png" style="border-width:0px;" /></a>
</td>
</tr>
and now im getting output like this when i give the code
HtmlElement pageElement = webBrowser1.Document.GetElementById("tableid");
textResult = pageElement.Children[0].InnerText;
this.textBox1.Text = textResult;
"aaaa bbbbb ccccc ddddd
eeee fffff ggggg hhhhh"
but i need to get the output like this
"aaaa bbbbb ccccc ddddd samfile.aspx?id=11111
eeee fffff ggggg hhhhh samfile.aspx?id=22222"