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 ...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1969 | Hits: 103

Similar Posts

  • ASP.NET disk-based caching more
  • "The security validation for this page is invalid" when calling the SharePoint Web Services more
  • Don’t use Response.End() with OutputCache more
  • IIS 7 Error Pages taking over 500 Errors more
  • EOAST #4 Evolution of a software thingy Part 4 more
  • Troubleshooting Website Problems by Examining the HTTP Traffic more
  • Use UTF-8 Encoding in HTTP Requests more
  • Cross domain request in Silverlight 2.0 beta 2 more
  • Firefox 3.0 and (ASP.NET) caching observations more
  • DotNetZip now can save directly to ASP.NET Response.OutputStream more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD