Click here to Skip to main content
11,478,619 members (66,221 online)
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 2:20am
Edited 12-Jun-13 2: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 Sergey Alexandrovich Kryukov 289
1 F-ES Sitecore 170
2 Frankie-C 120
3 OriginalGriff 105
4 DamithSL 95
0 Sergey Alexandrovich Kryukov 7,865
1 OriginalGriff 7,341
2 Sascha Lefèvre 3,059
3 Maciej Los 2,491
4 Richard Deeming 2,335


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 12 Jun 2013
Copyright © CodeProject, 1999-2015
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