Click here to Skip to main content
11,581,982 members (79,568 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 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 345
1 Sergey Alexandrovich Kryukov 220
2 Andy Lanng 114
3 virusstorm 109
4 Kornfeld Eliyahu Peter 90
0 OriginalGriff 1,358
1 Sergey Alexandrovich Kryukov 970
2 Abhinav S 671
3 F-ES Sitecore 505
4 Suvendu Shekhar Giri 448


Advertise | Privacy | Mobile
Web03 | 2.8.150603.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