like in title + how to handle button click which button is in GridView Footer also?
file .aspx seems like this
Inside your GridView_RowCommand
Event you 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 txtSomeNewValue = ((TextBox)GridView1.FooterRow.FindControl("txtSomeNewValue"));
string theTextValue = txtSomeNewValue.Text;
}
}
Update: wrapped the code in an if block that checks if the commandname
is what you were expecting. This event is also used for delete, edit, etc, so you might end up running the code for an event you didnt intend if you dont wrap it in this.