protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.Equals("add"))
{
string newname = ((TextBox)GridView1.FooterRow.FindControl("txtnewUserName")).Text.Trim();
TextBox t = GridView1.FooterRow.FindControl("txtUserage") as TextBox;
string s = t.Text;
//SqlConnection con = new SqlConnection("data source=shankar-pc\\shankar ; initial catalog=master;user id= sa;password=password@1");
// con.Open();
//con.Close();
ClientScript.RegisterStartupScript(Page.GetType(), "acknowledgement", "<script>alert('Record inserted successfully!!!!!!!!')</script>");
}
}