Using System.Net;
// for Downloading file from net
WebClient c = new WebClient();//for accessing net client
string s = c.DownloadString("http://www.w3schools.com");//read all string from given URL
Response.Write(s.ToString()); //view the page
// path name to download file //paht name to save a file
c.DownloadFile("http://w3schools.com/html/default.asp", "C:\\Documents and Settings\\Administrator\\My Documents\\vijay_programs\\w3schools_index.asp");
No comments:
Post a Comment