After connecting to the database in asp.net using c# as the language
I want update the table using my application where i give the details in the text box present in the application should be updated in the table....
i need the ccoding...
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vishnujeet KumarPosted Dec 5, 2012, 9:56 AM
Please mark answer as accepted answer if it resolves your problem.
Ajith sPosted Dec 4, 2012, 11:38 AM
Rajan GhorechaPosted Dec 4, 2012, 3:54 AM
is in the .cs file
protected void upd_Click(object sender, EventArgs e)
{
SqlConnection cn = new SqlConnection(@"Put the Connection String");
cn.Open();
SqlCommand cmd = new SqlCommand("UPDATE Cust_master SET Name ='" + TextBox2.Text.Trim() + "', Contact ='" + TextBox3.Text.Trim() + "', Address ='" + TextBox4.Text.Trim() + "'WHERE Cust_id =" + TextBox1.Text.Trim() + "", cn);
cmd.ExecuteNonQuery();
cn.Close();
load();
}
also code file is atteched here
Vishnujeet KumarPosted Dec 4, 2012, 2:50 AM