Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# .NET
I want to make an application in C# that is capable of accessing a website and extract the required information from it.
 
I am new so please help anybody...
 
Thanks
Posted 4-Jan-13 5:11am
Comments
Sandeep Mewara at 4-Jan-13 11:27am
   
Access website in what way? Is the other website and it's data accessible to you? Or are you trying to access data from someone elses website?
deepaksharma0390 at 4-Jan-13 11:33am
   
yes the data which is available on someone else's website.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

the data which is available on someone else's website.
For using/accessing data from someone else website, you only have an option of screen scrapping. Further, you need to make sure capturing/copying data is allowed by that website or else there might be a legal issue.
 
For page scrapping, have a look at this:
MSDN: WebRequest Class details with sample[^]
 
Other Samples:
CP Vanity[^]
The Code Project Forum Analyzer : Find out how much of a life you don't have![^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Yes you can, absolutely. This is the technique of something called Web scraping: http://en.wikipedia.org/wiki/Web_scraping[^].
 
You need to use the class System.Net.HttpWebRequest, for simplest cases you could you the class System.Net.WebClient. And then you may need something to parse obtained HTML content. For further detail, please see my past answers:
get specific data from web page[^],
How to get the data from another site[^].
 
—SA
  Permalink  
v2

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

  Print Answers RSS
0 Gihan Liyanage 332
1 Sergey Alexandrovich Kryukov 250
2 ClimerChinna 222
3 vikinghunter 188
4 OriginalGriff 161
0 Sergey Alexandrovich Kryukov 8,373
1 OriginalGriff 7,112
2 CPallini 2,598
3 Richard MacCutchan 2,025
4 Abhinav S 1,788


Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 4 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100