I have a datalist
<asp:DataList ID="dlst1" runat="server" RepeatDirection="Horizontal" RepeatColumns="5"
CellSpacing="8">
<ItemTemplate>
<asp:ImageButton ID="Image" runat="server" ImageUrl='<%#"~/Controls/handler1.ashx?FileName=" +DataBinder.Eval(Container.DataItem, "FilePath") %>'
OnCommand="Select_Command" CommandArgument='<%# Eval("Id").ToString() +";"+Eval("FilePath")+";"+Eval("Index")+";"+Eval("FileName") %>' />
</ItemTemplate>
</asp:DataList>
How could i select multiple images?
I would probably use jQuery to select images at client side and maintain the selection in the hidden field. For example,
Use with below JS
This is a basic (untested) code that should get you started. There are many improvements that you can try – e.g. setting a focus rectangle on image hive, adding a keyboard support, using html5 data attribute to store id instead of alt attribute etc.