Last post Oct 27, 2009 07:05 AM by DeadBurger
Oct 27, 2009 05:21 AM|lahorya|LINK
Can anyone explain what is page header? Request Headers, Response Headers? How we can read them in asp .net. Thanks in advance.
Oct 27, 2009 07:05 AM|DeadBurger|LINK
Request headers are the metadata that the user sends to the server like: browser version, browser language, user cookies etc.
Response headers are the metadata that the server sends back to the user like: content type, cookies, date etc.
You can get/set headers like this:
string language = Request.Headers["Accept-Languge"] // browser languages
Response.Headers["Content-Type"] = "text/html"; //html page
There are also properties for the common use headers like:
Response.ContentType = "text/html"