This is a migrated thread and some comments may be shown as answers.

Exception while trying to use Radajaxpanel in aspx page.

2 Answers 85 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Umar
Top achievements
Rank 1
Umar asked on 09 May 2011, 03:36 PM
I'm trying to use radajaxpanel in my page, but got the below exception.

"The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)."

Below is the code how am trying to use this in my page.

 <div id="pnlAddView">
            <telerik:radajaxpanel id="upSave" loadingpanelid="RadAjaxLoadingPanel1" runat="server">
                  <asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox>
                  <br />
                  <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" />
                </telerik:radajaxpanel>
        </div>
        <div id="pnlMessageView" style="display: none;">
            Some static contents here.
        </div>


Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 11 May 2011, 05:51 AM
Hello Umar,

The provided information is not enough to examine the real reason and one suggestion is, if you have any code blocks you can enclose them using telerik:RadCodeBlock tag.

Take a look at the following links.
RadCodeBlock and RadScriptBlock
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)

Thanks,
Shinu.
0
Umar
Top achievements
Rank 1
answered on 11 May 2011, 09:34 AM
Hi Shinu,

Thanks for the reply. using RadScriptBlock solved my problem. It was some JavaScript on the page which was causing this problem.
Thanks.
Tags
Ajax
Asked by
Umar
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Umar
Top achievements
Rank 1
Share this question
or