Update table data in asp.net c#
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Connection string");
con.Open();
SqlCommand cmd=new SqlCommand("Update table1 set name='"+TextBox1.text+"' where no='"+textbox2.text+"'",con);
cmd.ExecuteNonQuery();
con.Close();
}
No comments:
Post a Comment