Question

I have a TemplateField column in a gridview with a image button inside of it. i need to use two command arguments within single image button. here is my code

<asp:TemplateField ItemStyle-Width="30px">
     <ItemTemplate>
         <asp:ImageButton ID="btnAvaililabitly" runat="server" 
                          ImageUrl="~/CMS/images/available_icon.png"
                          Width="12px" Height="12px" CommandName="availability" 
                          ToolTip="Rooms Availability"
                          CommandArgument='<%#Eval("HotelID")%>'/>
     </ItemTemplate>
</asp:TemplateField>

please help

No correct solution

OTHER TIPS

You can send comma separated string and collect value on server side

CommandArgument= '<%# String.Format("{0} , {1}", Eval("Name1"), Eval("Name2")) %>'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top