my webform app have a datalist in the updatepanel, and datalist contain:{imagebutton, label,label}. datalist is connected to bank. in imagebutton thumbs of images will be show. I want when a user clicked each imagebutton in datalist, original image will be shown. all data successfully shown in datalist but problem is after click on imagebutton. i cant continue. how can I detect which imagebutton clicked? what is the its datasource? what is the text or datasource of labes that are in same cell?
please help me, my code is as blow:
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div class="content">
<div class="datashow">
<asp:DataList ID="DataList1" runat="server" BorderColor="#666666" BorderStyle="None" BorderWidth="2px" CellPadding="2" CellSpacing="2" Font-Size="Small" RepeatDirection="Horizontal" CssClass="dl" HorizontalAlign="Center" RepeatColumns="5">
<HeaderStyle BackColor="#333333" Font-Bold="True" Font-Size="Large" ForeColor="White" HorizontalAlign="Center" Wrap="True" />
<ItemTemplate>
<asp:ImageButton ID="imgbtn" runat="server" ImageUrl='<%# Bind("imgtp","~/images/{0}") %>' Width="100px" OnClick="imgbtn_Click" />
<br />
<b>Employee Name:</b>
<asp:Label ID="lblCName" runat="server" Text='<%# Bind("name") %>'></asp:Label>
<br />
<b>Designation:</b>
<asp:Label ID="lblName" runat="server" Text='<%# Bind("company") %>'></asp:Label>
</ItemTemplate>
</asp:DataList>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
and
protected void imgbtn_Click(object sender, ImageClickEventArgs e)
{
//how to detect which imagebtn clicked and what is its datasource?
}