I am showing user control based on some conditions using code block while using telerik radgrid in my page
but I am getting the below message
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Here is code in my aspx page.
<% if (parentcompany_id != 2840 && parentcompany_id == 2960)
{ %>
<div class="Drop-down-div" style="clear:both" >
<div style="margin-top: 5px; clear:both; width: 74px" class="Drop-down-child">Other Filter </div>
<div class="Drop-down-child">
<uc1:EventFilter ID="EventFilter1" runat="server" />
</div>
<div class="Drop-down-child">
<uc1:Status ID="Status1" runat="server" />
</div>
</div>
<%} %>
If I remove this code it works fine, Please let me know what i am missing
Thanks & Regards
Bharat Bhushan
but I am getting the below message
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Here is code in my aspx page.
<% if (parentcompany_id != 2840 && parentcompany_id == 2960)
{ %>
<div class="Drop-down-div" style="clear:both" >
<div style="margin-top: 5px; clear:both; width: 74px" class="Drop-down-child">Other Filter </div>
<div class="Drop-down-child">
<uc1:EventFilter ID="EventFilter1" runat="server" />
</div>
<div class="Drop-down-child">
<uc1:Status ID="Status1" runat="server" />
</div>
</div>
<%} %>
If I remove this code it works fine, Please let me know what i am missing
Thanks & Regards
Bharat Bhushan