Friday, August 24, 2007

Get the last modified date of the url using HttpWebRequest and HttpWebResponse

Get the last modified date of the url using HttpWebRequest and HttpWebResponse


private void getLastModifiedDateOfUrl(){
HttpWebRequest req = (HttpWebRequest) WebRequest.Create("
http://computerbapu.blogspot.com");
HttpWebResponse resp = (HttpWebResponse) req.GetResponse();
Response.Write ("Last modified: " + resp.LastModified);
resp.Close();}

//output: Last modified: 24/08/2007 04:29:23

No comments: