2
我正在开发一个电影院的座位预订网站。我已经使用ImageButton
将图像放置为Seats
在asp:gridview(all cells)
中。对于选定的座位,当用户点击它时,ImageButton(cell)
为该座位设置。如何在ASP.Net中动态点击单元格时获取gridview单元格的值
我需要获得从gridview
点击的座位。我怎么能做到这一点?
我正在开发一个电影院的座位预订网站。我已经使用ImageButton
将图像放置为Seats
在asp:gridview(all cells)
中。对于选定的座位,当用户点击它时,ImageButton(cell)
为该座位设置。如何在ASP.Net中动态点击单元格时获取gridview单元格的值
我需要获得从gridview
点击的座位。我怎么能做到这一点?
您可以在网格视图的RowCommand事件中找到ImageButton。
部分代码:
string strType="";
ImageButton img = (ImageButton)e.CommandSource;
strType = img.Attributes["TypeID"].ToString();
设计部分:
<asp:ImageButton ID="imgBtn" runat="server" ImageUrl="image"
TypeID="..Give your value.." />
做jQuery是确定在这里? –