Charset Encoding in ASP.NET Response
Posted by: Rick Strahls WebLog,
on 23 Dec 2007 |
View original | Bookmarked: 0 time(s)
I was reviewing some control and handler code in my wwHoverPanel control's AJAX callback handler code. There are a number of routines that generate JavaScript output from JSON to returning resources and I noticed that the content type headers would often vary slightly. When returning a content type header you typically want to do something like this: protected override void OnLoad(EventArgs e)
{
Response.ContentType = "text/xml"; ... go on with your bad self
...