0
我有一个ASP .NET项目下面的代码它有一个GridView用下面的代码:ASP.NET的按钮栏命令
<Columns>
<asp:ButtonField ButtonType="Button" CommandName="Sel" Text="Select" />
</Columns>
,我试图单击时引发一个事件。我使用下面的代码在cs文件:
protected void grdTimes_RowCommand(Object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Sel")
{
lblError.Text = "command";
}
}
不幸的是,lblerror.text犯规变化是单击按钮时。有任何想法吗?