I want to get type of a web address. For example this is a Html page and its page type is text/html but the type of this is text/xml. this page\'s
text/html
text/xml
it should be something like this
var request = HttpWebRequest.Create("http://www.google.com") as HttpWebRequest; if (request != null) { var response = request.GetResponse() as HttpWebResponse; string contentType = ""; if (response != null) contentType = response.ContentType; }