Is there anyway to obtain values from asp.net website and send it .net console application. Program hits to Console.ReadLine() and I need it to collect input from asp.net website one way or another.
Asked
Active
Viewed 1,864 times
-1
-
Everything explined here http://stackoverflow.com/questions/1502500/how-to-use-webrequest-to-post-data-and-get-response-from-a-webpage – Murali Murugesan Mar 06 '14 at 13:51
-
What is this "input"? Are you looking to scrape some data from a webpage? If that's the case it doesn't matter what server-side technology is used to build the webpage, all you need to do is make a request for the page and parse the data from the response. "Screen scraping" or "website scraping" are good terms to search for countless examples on the subject. – David Mar 06 '14 at 13:55
1 Answers
1
You can get the string from a webpage by using
var a = new System.Net.WebClient().DownloadString(myUrl);
And if you want it as output to console you can
System.Console.WriteLine(new System.Net.WebClient().DownloadString(myUrl));

Archlight
- 2,019
- 2
- 21
- 34