protected void btneditdata_Click(object sender, EventArgs e) { int userid = 0; if (hfuserid.Value != null && hfuserid.Value != "") { userid = Convert.ToInt32(hfuserid.Value); } dsupdate = loginDA.updateusermaster(userid, txtfirstnamedemo.Text, txtlastnamedemo.Text, txtemaidemo.Text, txtphonenumberdemo.Text, txtsecurityanswer.Text); if (dsupdate != null && dsupdate.Tables[0].Rows.Count > 0) { if (dsupdate.Tables[0].Rows[0]["COUNT"].ToString() == "0") { lblvalidatemessege.Text = "Data Changed Successfully."; BindGridviewdata(); txtfirstnamedemo.Text = ""; txtlastnamedemo.Text = ""; txtphonenumberdemo.Text = ""; txtemaidemo.Text = ""; txtsecurityanswer.Text = ""; hfuserid.Value = ""; txtvalidation.Attributes.Add("style", "display:none"); } } else { lblvalidatemessege.Text = "You are trying to enter incorrect data."; } }