我在datagrid中添加了兩列按鈕列,可是我現在不能判定我究竟按下的是該行的那個按鈕?
注:這兩列應為其他原因所以用的不是edit列,而是itemtemplate中添加的button。那位高手能屆決,絕對感激!!
注:這兩列應為其他原因所以用的不是edit列,而是itemtemplate中添加的button。那位高手能屆決,絕對感激!!
解决方案 »
- access数据库删除无限级分类语句怎么写?
- 批量打印物流单后,如何获取对应的物流单号?
- WebBrowser处理特殊字符的问题
- <请教>:HyperLink中怎样取得用户点选某项字段的值~~
- 如何同步复制id
- 请大家看看:IE7中的DIV问题
- 为什么context.user.Identity.name总是为空
- 這樣的字符串"http://www.163.com/wwwimages/n/163logo.gif",怎樣取得"163logo.gif"出來呀?
- 关于.net的mis开发中的问题!!!欢迎大家讨论!!!
- 为什么我更新不了数据库呢???请高手指点啦。。。
- 急~!一个页面两个用户控件读取会话的问题2.
- IIS的配置??
在Item_Command事件里面判断
if(e.CommandName = "xxx")
..........
然后在 Item_Command 事件里判断:如下:private void Item_Command(....)
{
if(e.CommandName == "cmdEdit")
{
//your edit code here
}
else if(e.CommandName == "cmdDel")
{
//your delete code here
}
}
</asp:Button>
asp:Button ID=bu2 Runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"down")%>' CommandName="down">
</asp:Button>在ItemCommand事件中
if(e.CommandName=="view")
{
//第一个按钮
}
else
//第二个按钮