Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hello,
 
I am running aspx page in a iframe which is in another aspx page. This iframe will be displayed as a lightbox(popup) on click of a button. While loading of iframe i am getting ajax assembly error
 
C:\Users\Stephen\Documents\Releases\AjaxControlToolkit50401\AjaxControlToolkitPrime\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs
 
If i click continue its displaying below message in iframe as a exception
 
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)
 
Can anyone help me..
 
Thanks
Posted 12-Jun-13 1:20am
Edited 12-Jun-13 1:31am
v2
Comments
@AmitGajjar at 12-Jun-13 7:32am
   
Have you tried to search your error message in google ?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This usually means you have <%...%> blocks in the header of a page or your master page. There are two ways to solve this exception:
First:
Remove JavaScript from the header section of page and add it to body of the page and run your application it will work for you.
Second:
Replace the code block with <%# instead of <%=.
 
You can also see : How to fix : The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).[^]
 
--Amit
  Permalink  
v2
Comments
Mada Naga Sankar at 12-Jun-13 7:57am
   
Its working with first one. Thanks.
_Amy at 12-Jun-13 7:58am
   
Welcome. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 389
1 Maciej Los 180
2 Richard MacCutchan 140
3 DamithSL 129
4 Kornfeld Eliyahu Peter 119


Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 12 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid