Simple way to display information from another Website
articles "How to get Images from others wesbite using url" and "How to get title and meta tags from others website using URL". So lets start how to implement this trick First, Select one New asp.net website Next, Add one Label in design page Code :
Next, Add the following namespaces in code behind
using System; using System.Net; using System.IO;Next, Write the following code in Page load
WebRequest wReq = WebRequest.Create("http://www.developerscode.com"); WebResponse mRes = wReq.GetResponse(); StreamReader sr = new StreamReader(mRes.GetResponseStream()); string sHTML = sr.ReadToEnd(); sr.Close(); mRes.Close(); if (sHTML != string.Empty && sHTML != null) { lblDisplay.Text = sHTML; }That's it.Happy coding
Labels: .Net Tutorials, Ajax, Aspnet, javascript, tricks
<< Home