Problem with textbox
protected System.Web.UI.WebControls.TextBox txtPrenom;
protected System.Web.UI.WebControls.TextBox txtNom;
protected System.Web.UI.WebControls.TextBox txtCourriel;
protected System.Web.UI.WebControls.TextBox txtAdresse;
protected System.Web.UI.WebControls.TextBox txtVille;
protected System.Web.UI.WebControls.TextBox txtProvince;
protected System.Web.UI.WebControls.TextBox txtPays;
protected System.Web.UI.WebControls.TextBox txtCodePostal;
protected System.Web.UI.WebControls.TextBox txtTelephone;
in my page_load I do something like this :
txtNom.Text = objUsager.Nom;
txtPrenom.Text = objUsager.Prenom;
txtCourriel.Text = objUsager.Courriel;
txtAdresse.Text = objUsager.Adresse;
txtVille.Text = objUsager.Ville;
txtProvince.Text = objUsager.Province;
txtPays.Text = objUsager.Pays;
txtCodePostal.Text = objUsager.CodePostal;
txtTelephone.Text = objUsager.NoTel;
But when I try to get back the "change" in the texte box in
private void cmdUpdate_Click(object sender, System.EventArgs e)
{
objUsager.Nom = txtNom.Text;
objUsager.Prenom = txtPrenom.Text;
objUsager.Courriel = txtCourriel.Text;
objUsager.Adresse = txtAdresse.Text;
objUsager.Ville = txtVille.Text;
objUsager.Province = txtProvince.Text;
objUsager.Pays = txtPays.Text;
objUsager.CodePostal = txtCodePostal.Text;
objUsager.NoTel = txtTelephone.Text;
objUsager.Update();
}
I only get the value I had in my page load and not the modification I've made in the page...
Is there somebody who know why and howto fix this?
|