scalf Posted October 11, 2005 Posted October 11, 2005 Hi, I have a problem on a webform on which I have several textbox fields and a submit server control button. When I display the first time my webform, it reads a database and displays values in the textbox fields. Then the user will have to change the values and click on the submit form and when I do that, the values in the textbox fields have not changed, it saves the values displayed on the first display... :( Does anyone have an idea. NB : I tried with a new webform with only 2 textbox fields and it works, so, it is not a web.config parameter or something like that...I checked the Viewstate enable/disable values and there's nothing special (I kept the default values : enabled). I checked also that the submit button Causes validation (property "CausesValidation" =true). Quote Scalf. Do not want others to know what you have done? Better not have done it anyways.
scalf Posted October 12, 2005 Author Posted October 12, 2005 Lets see some code. OK, it has been solved, I forgot adding "If Not Page.IsPostback" at the beginning of my code :o which made the textbox fields always be reinitialized by the values of database instead of keeping the changed values. Many Thanks to you. Quote Scalf. Do not want others to know what you have done? Better not have done it anyways.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.