protected void btnsubmit_Click(object sender, EventArgs e) { if (btnsubmit.Text == "Submit") { objfeedbackdal.insertFeedback(objfeedbackbal); Response.Write("<script>alert('Record inseted');</script>"); } else { objfeedbackbal.FeedbackID = Convert.ToInt32(GridView1.SelectedRow.Cells[3].Text); objfeedbackdal.updateFeedback(objfeedbackbal); Response.Write("<script>alert('Record updated');</script>"); } bindgrid(); resetconrol(); MultiView1.ActiveViewIndex = 0; }