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

Error if RadAjaxPanel has serverside code

1 Answer 47 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
test
Top achievements
Rank 1
test asked on 18 Sep 2009, 10:37 AM
I got this runtime error when using RadAjaxPane
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
My code is

<

 

telerik:RadAjaxPanel ID="RadAjaxPanel3" runat="server" LoadingPanelID="LoadingPanel1">

 

 

 

<table width="100%" border="0" cellspacing="0" cellpadding="0">

 

 

<tr>

 

 

<td style="width: 105px"><a href="#" id="idCompliance" runat="server">><asp:ImageButton ID="btnCompliance" runat="server" ImageUrl="~/images/btn_compliance.gif" /></a></td>

 

 

<td style="width: 105px"><a href="#" id="IdCalc" runat="server"> <asp:ImageButton ID="btnCalc" runat="server" ImageUrl="~/images/btn_calculate.gif" /></a></td>

 

<%

If isProclose = True Then%>

 

 

<td style="width: 105px"><a href="#" id="idProcloseDownload" runat="server"><img src="<%=m_strVirtualPath%>images/btn_xml.gif" alt="" width="85" height="34" style="border-style: none" /></a></td>

 

 

<td style="width: 105px"><a href="#" id="idMathCorpInDownload" runat="server"><img src="<%=m_strVirtualPath%>images/btn_in.jpg" alt="" width="85" height="34" style="border-style: none" /></a></td>

 

 

<td style="width: 105px"><a href="#" id="idMathCorpOutDownload" runat="server"><img src="<%=m_strVirtualPath%>images/btn_out.jpg" alt="" width="85" height="34" style="border-style: none" /></a></td>

 

<%

End If%>

 

 

<td align="right"><a href="#" id="IdPrint" runat="server"><asp:ImageButton ID="btnPrint" runat="server" ImageUrl="~/images/btn_print.gif" /></a>&nbsp;

 

 

<a href="#" id="IdCourier" runat="server"><asp:ImageButton ID="btnCourier" runat="server" ImageUrl="~/images/btn_courier.gif" /></a></td>

 

 

</tr>

 

 

</table>

 

 

</telerik:RadAjaxPanel>
I know the server-side code "<%If isProclose = True Then%>" caused the error, If I removed it, it is back to work. But I can't remove it there are two many.

Your help is apprecated.
Thanks
Wei

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 18 Sep 2009, 03:38 PM
Hello Wei,

Please review RadCodeBlock and RadScriptBlock for details about how to avoid the mentioned error.

I hope this helps.

Regards,
Martin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
test
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or