datalist取值问题,急,在线等!!
以下是我的datalist代码,请问,怎样在单击ImageButton1的事件中获取同一DataList中“PathLabel”的值
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource4" RepeatColumns="3" Width="1024px" CssClass="table" >
<ItemTemplate>
<table>
<tr>
<td>
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%# Eval("Path") %>' Width="320px"/>
</td>
</tr>
</table>
<asp:Label ID="PathLabel" runat="server" Text='<%# Eval("Path") %>' CssClass="H1">
</asp:Label>
</ItemTemplate>
</asp:DataList>
------解决方案--------------------protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
{
if (e.CommandName == "aa")
{
}
}
------解决方案--------------------顶一下
------解决方案--------------------顶顶顶