private void btnedit_Click(object sender, EventArgs e) { DialogResult dr = MessageBox.Show("Are you sure to save Changes", "Message", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information); if (dr == DialogResult.Yes) { con.Open(); string strQuery = "update tblProducts set ProductsId='" + textBox1.Text+ "',CategoryName='" + comboBox1.Text + "',ProductsName='" + txtpname.Text + "',ProductsDescription='" + txtpdes.Text + "',ProductsPrice='" + txtpprice.Text + "' where ProductsId=" + textBox1.Text; SqlCommand cmdSelect = new SqlCommand(strQuery, con); cmdSelect.ExecuteNonQuery(); con.Close(); // bindgrid(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)