c# - Hiding ItemTemplate Controls within Formview -


currently code hiding panel(s) contained within itemtemplate of formview dependent on users role(s).

the current solution: ((panel)formview1.findcontrol("pnlisadmin")).visible = isadmin;

the problem code can't run until formview has been completed .databind();

now don't know formviews, surely there's way me hide controls such panel above in better place, , not dependent on .databind(); ( on page load )??

thanks information.

i don't mixing code-behind & display pages, wrap control in server tags:

<% if(isadmin){ %> <asp:panel id="pnlisadmin" runat="server"></asp:panel> <% } %> 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -