Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have five html pages in a folder, i want to read particular div element from each page and append to another html page say "final.html".
How can i achieve using asp.net



Thanks&Regards
gsknb.
Posted

1 solution

Use the HttpWebRequest object to request the page and parse it, or the (free) HtmlAgilityPack library to do the same thing (makes it easier to parse the returned page). Once you've extracted the div, just create another page in memory and Response.Write it to the user.
 
Share this answer
 
v2
Comments
gsknbabu 20-Jul-11 2:34am    
Thanks John,
i used HtmlAgilityPack library to pick content of div tag element.
gsknbabu 20-Jul-11 9:06am    
Hi,
I have a html file with some div tags in it.i want div ids for further validations.
how can i got the div id values using Html Agility Pack.
previously i got all the content of the div from

doc.DocumentNode.SelectNodes("/html/body/div[@id='login']")

i want only 'login' rather than all the content.

Thanks & Regards
gsknb

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900