Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

I was looking for some help regarding the problem that

Suppose there is one website....www.xyz.com
and there are 40 links on the website's home page.

Now i want that using C# and asp.net i do have an String array suppose LinkArray[n] and TabArray[n] {string array} and i want that there should be a program which
can list all the links in the array as follows.

links :
HTML
<a href="xyz.com/home.html">Home</a> <a href="xyz.com/Contact.html"> </a>
etc

Now i want that in two arrays it should be stored as

TabArray[2] (contains tabs in the array values)
Home
Contact


LinkArray[2] (contains links in the array values)
xyz.com/home.html
xyz.com/contact.html



Likewise i want that i can get listed all the links details in of any web page.

Please suggest me some code/ guide tutorials

Thanks
Posted

Have a look at this article Screen Scraping with C# for ASP.NET[^].
 
Share this answer
 
Comments
Rubaba 3-Dec-11 11:50am    
5* for link
IF you want to scrape all HTML links and HREFs from specific web pages, for maintenance or validation of your site. This is called screen scraping. And You will find approx About 122,000 results (0.09 seconds)
google results by using screen scraping C# keywords. So better you google and improve your problem solving power.

Ref. C# Scraping HTML Links

For further information please feel free to leave a comment.
 
Share this answer
 
v2
Comments
Rubaba 3-Dec-11 11:50am    
nice answer 5*
Monjurul Habib 3-Dec-11 13:01pm    
thank you Rubaba.

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