Sunday, 15 May 2011

c# - Why do I need to set the Visibility of LinkButton in a ListView Layout in the LayoutCreated event instead of directly on the LinkButton? -


I have a ListView control and I have LinkButton in the LayoutTemplate I see the visible property of & lt;% # isUserAdmin%> Tried to set up, where IsUserAdmin is a method that the user is either an administrator or not and gives the right or wrong based on the visibility set of controls, but I found out that this layout does not work for the template and I have a layout Go to the created event and get control And then to set the visibility I have to do this to control'm curious Leauttemplet me? I can use the object property in the ItemTemplate with no problem using the & lt;% # ISUserAdmin%> I was thinking that it would be really easy for LayoutTemplate, because only 1 control for Multiple Items for the ItemTemplates Instead is generated.


No comments:

Post a Comment