Click here to Skip to main content
12,301,965 members (54,147 online)
Rate this:
 
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 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 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160530.1 | Last Updated 4 Jan 2013
Copyright © CodeProject, 1999-2016
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