Working around Controls.Add() and <%= %> Script Limitations with JavaScript

Posted by: Rick Strahls WebLog, on 20 Jun 2006 | View original

A while back I had run into a problem with script expressions (<% %> and <%= %>) and Controls.Add() functionality in ASP.NET pages. The problem is that if you have any sort of markup script inside of a container object that you’re calling Controls.Add() (or InsertAt())on, ASP.NET will complain that it can’t add any controls because of the script code.   This is a fairly major problem for generic code that wants to inject controls into the page dynamically. My scenario...

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

Similar Posts

  • Build and publish .Net 2.0 projects with NAnt and the MSBuild task - level 200 more
  • ASP.NET: What is the function of FindControl method? more
  • ASP.NET: causing a postback after modal dialog is closed more
  • Using the XmlDataSource Data property for easy samples more
  • Working with Html in XmlDataSource XML Data Source Files more
  • Adding CoComment support to Community Server 2.1 more
  • Editable GridView & Row Level Binding more
  • Captcha Control more
  • Collaborative Application Markup Language (CAML) more
  • New Atlas CTP Posted (now includes updatepanel support in dynamic controls) 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