Click here to Skip to main content
15,917,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<asp:Label ID="lblactive" runat="server" Text='<%# Convert.ToBoolean(Eval("IsActive")) ? "Yes" : "No"%>'
                                                                                             Visible="false"></asp:Label>
                                                                                         <asp:ImageButton ID="imgActive" runat="server" ImageUrl="~/Images/Active.png" Visible='<%# Eval("IsActive") %>'
                                                                                             Width="24px" Height="24px" OnCommand="imgActive_Command" CommandName="Active"
                                                                                             CommandArgument='<%# Eval("UserRoleFundFamilyID") %>' />
                                                                                         <asp:ImageButton ID="imgInActive" runat="server" ImageUrl="~/Images/InActive.png"
                                                                                             Visible='<%# !Convert.ToBoolean(Eval("IsActive")) %>' Width="24px" Height="24px"
                                                                                             OnCommand="imgActive_Command" CommandArgument='<%# Eval("UserRoleFundFamilyID") %>'
                                                                                             CommandName="InActive" />
                                                                                     </ItemTemplate>
Posted

1 solution

Command Arguments used to provide more information to the control, which can be read in the Server Event
more details[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900