Hello,
i am trying to change textbox value that i retrieved. I have a form which contains, a combobox from ajaxcontroltoolkit, a button to submit, a textbox for inserting comments. To beginning when i change a combobox value, automatically, the comment stored in database is filled in textbox. Now even i change this comment, i still have older comment which is retrieved from database, new comment is never stored.
The autopostback on textbox is false. I tried to make it in true, no change. I tried to implement textchanged event. Same result.
When i add a test on ispostback property same result.
Here is some code:
try
{
CbNomContact.Enabled = true;
if (cbMission.SelectedValue.ToString().Contains("Numéro:"))
{
first = cbMission.Text.IndexOf("Numéro:");
numSA = cbMission.SelectedValue.ToString().Substring(first + 7, first + 2);
CbNomContact.DataSource = BindContacts(numSA);
CbNomContact.DataBind();
CbNomContact.SelectedIndexChanged += new EventHandler(CbNomContact_SelectedIndexChanged);
txbxdesc.Text = RetrieveServiceAppointmentDescription(numSA);
txbxObs.Text = RetrieveServiceAppointmentObservation(numSA);
}
}
catch (Exception e) {
e.ToString();
}
The change in combobox call this method. the submit method attached on button call implicitly again this method and overwrite the value of comment. I have a autopostback on true in combobox. I tried to make it at false, no change appear.
Any idea?
Thanks