Click here to Skip to main content
12,251,889 members (58,799 online)
Rate this:
 
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 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 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100