我正在使用中的OnClick
事件EditButton
GridView
protected void editclick(object sender, EventArgs e)
{
try
{
Button EditButton = (Button)gvUserMaster.FindControl("edit_btn");
tblAddEdit.Visible = true;
}
catch(Exception ex)
{
}
}
但我得到了例外:
找到具有相同 ID 'lblUserName' 的多个控件。FindControl 要求控件具有唯一的 ID。
我尝试使用 foreach 循环,但这也不起作用。