Hi priyanka,
I have checked again both of your HTML and Updated code., as what I tested was not the updated code. Now with the updated code I got the same error which you were getting since a long. Please update your page_Load method and try again.
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Constr"].ConnectionString);
SqlDataAdapter da = new SqlDataAdapter("SELECT EmpId, FirstName, LastName FROM PersonalInfo", con);
DataTable dt1 = new DataTable();
da.Fill(dt1);
ViewState["dt1"] = dt1;
GridView1.DataSource = dt1;
GridView1.DataBind();
}
}
Thanks and Regards,
Rk_Hirpara