protected void GrdViewCont_RowUpdating(object sender, GridViewUpdateEventArgs e) { Label Lblid = (Label)GrdViewCont.Rows[e.RowIndex].FindControl("LblNo"); TextBox txtNam = (TextBox)GrdViewCont.Rows[e.RowIndex].FindControl("txtName"); Label Lbltp = (Label)GrdViewCont.Rows[e.RowIndex].FindControl("LblType"); SqlCommand cmd = new SqlCommand("update ContarctorDefTable set Contractor_Name = '" + txtNam.Text + "'" + ",Contractor_Type='" + LblType.Text + "' where ID = '" + Lblid.Text + "'", conn); conn.Open(); SqlDataReader reader; reader = cmd.ExecuteReader(); conn.Close(); GrdViewCont.EditIndex = -1; BindGrdViewCont(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)