Embedding JavaScript Strings from an ASP.NET Page

Posted by: Rick Strahls WebLog, on 14 Jul 2007 | View original

I'm looking at a piece of code that's a custom control that embeds a bit of JavaScript into a page. Part of this JavaScript is generating some static string text directly into the page. I've been running this code for a while now as part of an application I'm working on with a customer. But a couple of days ago I ran into a couple of problems with this control and as it turns out the problem is that the JavaScript strings embedded into the HTML stream aren't properly encoded. The code used is something...

Advertisement
The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.

Similar Posts

  • Fun Iterating PagedCollections With Generics and Iterators more
  • Tip/Trick: Show Detailed ASP.NET Error Messages to Developers (and only to Developers) more
  • ASP.NET: What is the function of FindControl method? more
  • August 9th ASP.NET Link-Listing more
  • How To Properly Group Partial Class Files in Visual Studio 2005 more
  • Run Cassini as Root Web within Visual Studio more
  • Recipe: Dynamic Site Layout and Style Personalization with ASP.NET more
  • Adding Master Page Support to Dynamically Created Pages more
  • Displaying a Breadcrumb in the Page's Title more
  • Passing Values Between Pages in ASP.NET 1.x and 2.0 more

News Categories

.NET | ADO.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Community Server | dasBlog | 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