private void btnsubmit_Click(object sender, EventArgs e) { String connectionString = "server=...........;user id=....;password=....;database=abc"; SqlConnection thisConnection = new SqlConnection(connectionString); thisConnection.Open(); String thisQuery = "INSERT INTO abc (ID, Name, ContactNo, Email, Address) VALUES ('" + txtid.Text + "', '" + txtname.Text + "', '" + txtcontact.Text + "', '" + txtemail.Text + "', '" + txtaddress.Text + "')"; SqlCommand thisCommand = new SqlCommand(thisQuery, thisConnection); SqlCommand cmd = new SqlCommand(); thisCommand.ExecuteNonQuery(); thisConnection.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)