Variable problem

Nov 7 2007 6:15 AM
Hi all

I'm a complete newby to C#, so this should be very simple!

I have a bound datagrid displaying members. There are a number of buttons using the asp:ImageButton for deleting user, etc.

I want to be able to hide a button using css style, but the 'hidden' or 'visble' string should be in a varable.

For example:
<asp:ImageButton ID=ImgBtnDelete Runat=server ImageUrl="../Images/delete.jpg" AlternateText="Delete" CommandName="Delete" CssClass="right_blue_link" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "EmpId")%>' style="visibility: <%=strStyle%>"></asp:ImageButton>

strStyle is being declared ok & populated with the correct string
the style is working when the visibilty is hardcoded

The problem is retrieving the strStyle variable...

Help please?




Answers (1)