Answer: Inside our
GridView_RowCommand Event,we can access the footer control by
GridView1.FooterRow.FindControl method .
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.Equals("Insert", StringComparison.OrdinalIgnoreCase))
{
TextBox txt_emp_id = ((TextBox)GridView1.FooterRow.FindControl("txt_emp_id"));
string emp_id = txt_emp_id.Text;
}
}
Asked In: Many Interviews |
Alert Moderator