Hi all!
How can i update the values in textboxes from gridview using ID(Primary Key).
Below is my gridview code..
here is my update query--
SqlCommand cmd1 = new SqlCommand("Update tblCRUD set values FirstN='" + TextBox1.Text + "',LastN='" + TextBox2.Text + "',Gender='" + gender + "',Address='" + TextBox3.Text + "',Salary='" + TextBox4.Text + "',Jdate='" + TextBox5.Text + "' where EmpID=?, con1");
cmd1.CommandType = CommandType.Text;
if (con1.State == ConnectionState.Closed)
{
con1.Open();
cmd1.ExecuteNonQuery();
clear();
}
how to pass the EmpID value?
Thanks..
Puneet KankarPosted Jul 7, 2017, 11:11 AM