如何区分gridview中的两个《选择》按钮?
在gridview控件内定义了两个《选择》按钮:
<asp:CommandField SelectText="选择(修改)" ShowSelectButton="True" />
<asp:CommandField SelectText="选择(显示)" ShowSelectButton="True" />
在 protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) 事件中如何判断当前按下了哪一个《选择》按钮。
------解决方案--------------------------------------------------------
CommandName
------解决方案--------------------------------------------------------
楼上正解
------解决方案--------------------------------------------------------
CommandName=""
------解决方案--------------------------------------------------------
- HTML code
<asp:CommandField SelectText="选择(修改)" CommandName="update" ShowSelectButton="True" /> <asp:CommandField SelectText="选择(显示)" CommandName="select" ShowSelectButton="True" />
------解决方案--------------------------------------------------------
up!
------解决方案--------------------------------------------------------
------解决方案--------------------------------------------------------
------解决方案--------------------------------------------------------