protected void btnsubmit_Click(object sender, EventArgs e) { objfeedbackbal.FeedbackContent = txtfeedbackcontent.Text; objfeedbackbal.CustomerID = Convert.ToInt32(Session["customerid"].ToString()); objfeedbackbal.ServiceProviderId = Convert.ToInt32(Request.QueryString["spid"].ToString()); objfeedbackbal.FeedbackDate = System.DateTime.Now; objfeedbackdal.insertFeedback(objfeedbackbal); Response.Write("<script>alert('Thank you for your valuable feedback.');</script>"); resetcontrol(); }
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; }