Frage

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

Keine korrekte Lösung

Andere Tipps

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

CommandArgument= '<%# String.Format("{0} , {1}", Eval("Name1"), Eval("Name2")) %>'
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top