Click here to Skip to main content
15,911,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
below is the code snippet from huge html file.


HTML
<div class="Parent_Div">
<div class="gridItem"><a class="darkTouch" href="http://www.abc.com">
</div>

<div class="gridItem"><a class="darkTouch" href="http://www.abc1.com">
</div>

<div class="gridItem"><a class="darkTouch" href="http://www.abc2.com">
</div>

<div class="gridItem"><a class="darkTouch" href="http://www.abc3.com">
</div>

<div class="gridItem"><a class="darkTouch" href="http://www.abc4.com">
</div>

<div class="gridItem"><a class="darkTouch" href="http://www.abc5.com">
</div>

<div class="gridItem"><a class="darkTouch" href="http://www.abc6.com">
</div>
</div>


i want to gather all URL , I am using web browser control.
could some one please tell me how to do that .


i have 1 web browser control on my form and 1 button. after successful loading of page i want to gather all URL's from the page...
thanks and regards
Posted
Updated 29-Jun-12 2:36am
v2
Comments
ZurdoDev 29-Jun-12 8:27am    
What do you mean by gather all url? The easiest thing to do is use jQuery to select items. If you google jQuery selectors you'll get http://api.jquery.com/category/selectors/. Or, post more specific information so we can help.

1 solution

Use a regular expression. You should download the page using a HttpWebClient object and read the response stream using a StreamReader. Read the content to a string and use a RegularExpression the filter out all URL's.

Good luck,

Eduard
 
Share this answer
 

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