EspadaFung
New Member
I'm trying to figure out how to use a temporary variable (created from a loop) to show/hide a button.I have tabular data and some action buttons to the side of them. I need to be able to turn buttons off and on based on the state of that data. f.IsFoo is a boolean\[code\] <table stuff here> <% foreach (Foo f in listOfFoos) { %> <tr> <td> <%= Fubar(f)%> </td> <td> <%= Fubar1(f) %> </td> <td> <%= Fubar2(f)%> </td> <td> <%= Fubar3(f)%> </td> <td> <%= Fuba4(f)%> </td> <td> <%= Fubar5(f)%> </td> <td> <asp:Button Text="Load" runat="server" OnClick="FooBar" Visible='<%= f.IsFoo%>'/> </td> </tr><%}%>\[/code\]I'm pretty new to aspx and it's syntax and online searches have just confused me more.