Я не обновляю значение в текстовом поле
private void Bindload() { lbl_cat.Visible = false; if (Session["user"] != null) { string constr = ConfigurationManager.ConnectionStrings["name"].ConnectionString; using (SqlConnection con = new SqlConnection(constr)) { using (SqlCommand cmd = new SqlCommand("SELECT id_house_manager,name_house_manager,username_house_manager,name_house_manager from tbl where username_house_manager ='" + Session["user"] + "'", con)) { con.Open(); SqlDataReader reader = cmd.ExecuteReader(); while (reader.Read()) { lbl_cat.Text = reader["id_house_manager"].ToString(); lbl_id.Text = reader["name_house_manager"].ToString(); txt_name.Text = reader["name_house_manager"].ToString(); Session["id"] = lbl_cat.Text; } } } } else { Session.RemoveAll(); Response.Redirect("/Default.aspx"); } if (!IsPostBack) { } } protected void btn_update_Click(object sender, EventArgs e) { string cs = ConfigurationManager.ConnectionStrings["name"].ToString(); using (SqlConnection con = new SqlConnection(cs)) { con.Open(); using (SqlCommand cmd = new SqlCommand("UPDATE [db].[dbu].[tbl_house_manager] SET [name_house_manager] = @name_house_manager WHERE [username_house_manager] ='" + Session["user"] + "'", con)) { cmd.Parameters.AddWithValue("@name_house_manager", txt_name.Text); cmd.ExecuteNonQuery(); lbl_alert.Text = "thanks"; //after Sucessfully uploaded image con.Close(); } } }
[edit]Code block added - OriginalGriff[/edit]
Что я уже пробовал:
я не обновляю значение в текстовом поле - нет ошибки