0
我有我的列表視圖的ImageButton的,但我不能在Imagebutton1.Click
鍵入我的代碼(aspx.cs):的ImageButton
<asp:ListView ID="lvFotos" runat="server"
GroupItemCount="6" InsertItemPosition="LastItem" align="center">
<LayoutTemplate>
<table border="0">
<tr ID="groupPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>
<GroupTemplate>
<tr>
<td ID="itemPlaceholder" runat="server">
</td>
</tr>
</GroupTemplate>
<ItemTemplate>
<td align="center" height="150px"
style="background-color: #ffffff;color: #ffffff; border:none;" width="142px">
<asp:ImageButton ID="ImageButton1" ImageUrl="<%# Container.DataItem %>" runat="server" Width="142" Height="142" />
</td>
</ItemTemplate>
<InsertItemTemplate>
</InsertItemTemplate>
</asp:ListView>
我怎樣才能解決這個問題?
檢查:http://stackoverflow.com/questions/8327665/how-to-know-which-linkbutton-in-a-listview-was-clicked/8327761# 8327761 – 2013-02-18 13:31:06