ASP.NET获取<EmptyDataTemplate></EmptyDataTemplate>模板中的textBox控件值
时间:2011-03-28 来源:悟生慧
/// <summary>
/// GridView事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void gvFieldValue_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.Equals("Add"))
{
GridViewRow row = (GridViewRow)((e.CommandSource as LinkButton).NamingContainer);//获取值
string txtName = (row.FindControl("txtName") as TextBox).Text;
string txtCode = (row.FindControl("txtCode") as TextBox).Text;
}
}
相关阅读 更多 +