Simply cut and paste the code below to dynamically retreive html from web pages. Screen scraping in ASP.NET could not be any easier. With a little regex knowledge you could even filter the html and display links on your webpage.
Live Demo
Class Library References
private void Page_Load(object sender, System.EventArgs e) { //Retrieve URL from user input box if(Page.IsPostBack) litHTMLfromScrapedPage.Text = GetHtmlPage( tbURL.Text ); } public String GetHtmlPage(string strURL) { // the html retrieved from the page String strResult; WebResponse objResponse; WebRequest objRequest = System.Net.HttpWebRequest.Create(strURL); objResponse = objRequest.GetResponse(); // the using keyword will automatically dispose the object // once complete using (StreamReader sr = new StreamReader(objResponse.GetResponseStream())) { strResult = sr.ReadToEnd(); // Close and clean up the StreamReader sr.Close(); } return strResult; }