I am using to use <%= %>
inside server controls and gives me error:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
This is my code:
<asp:Menu runat="server" >
<Items>
<asp:MenuItem Text="Candidates" NavigateUrl="<%=Constants.AccountPageUrl %>" />
</Items>
</asp:Menu>
NavigateUrl=<%= varName %>
– Stokedout