protected void btnUpdae_Click(object sender, EventArgs e) { SqlDataAdapter daq; string connection = System.Configuration.ConfigurationManager.ConnectionStrings["MyDB"].ConnectionString; using (SqlConnection con = new SqlConnection(connection)) { con.Open(); daq = new SqlDataAdapter("update TextAnswers set Comments='" + grdView.Rows[1].Cells[5].Controls[0] + "', Marks=" + grdView.Rows[1].Cells[5].Controls[0] + " where Emp_ID=" + grdView.Rows[1].Cells[5].Controls[0] + "UserName='" + Request.QueryString["UserName"] + "'", con); SqlCommandBuilder sb = new SqlCommandBuilder(daq); sb.ConflictOption = ConflictOption.OverwriteChanges; daq.RowUpdated += new SqlRowUpdatedEventHandler(daq_RowUpdated); sb.ConflictOption = ConflictOption.CompareAllSearchableValues; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)