Hi, I am trying to update db using session, but unable to do it..below is my code..redirect is working fine but I have added update on second page and to update using session but its not working ...
string t = Session["s"].ToString();
cn.Open();
cmd.Connection = cn;
cmd.CommandText = "Update Labtest_Table set Name='" + tbName.Text + "', Desgn='" + tbDesg.Text + "', Cata='" + tbCat.Text + "' where ID = @ID2";
cmd.Parameters.AddWithValue("@ID2",t);
int row = cmd.ExecuteNonQuery();
cn.Close();
tbName.Text = "";
tbDesg.Text = "";
tbCat.Text = "";
plz help....