Click here to Skip to main content
15,886,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Updated 12-Jun-13 1:31am
v2
Comments
AmitGajjar 12-Jun-13 7:32am    
Have you tried to search your error message in google ?

1 solution

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
 
Share this answer
 
v2
Comments
Mada Naga Sankar 12-Jun-13 7:57am    
Its working with first one. Thanks.
_Amy 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900