Hi, I have a textbox and a button on my aspx page. When I click the button, the updated text (the original value is fetched from the database on form_load event) is supposed to be passed to a method in the button_click event. The problem I face is that when the button is clicked, the old textbox value is passed - in other words, if the old text in the textbox was "Mars", and I updated it to "Venus" - the click event gets "Mars". I tried simplyfing the code in the button's click event as follows: String s = Textbox1.Text; I still get the old value back. Any Idea what's going wrong? Thanks, AJ
I figured out the problem - I had skipped IsPostback check on page load - Thanks anyway "AJ" wrote in message news:2CE6624C-8431-4E22-ADCE-9B59D9F77AC5@microsoft.com... > Hi, > > I have a textbox and a button on my aspx page. When I click the button, > the updated text (the original value is fetched from the database on > form_load event) is supposed to be passed to a method in the button_click > event. > > The problem I face is that when the button is clicked, the old textbox > value is passed - in other words, if the old text in the textbox was > "Mars", and I updated it to "Venus" - the click event gets "Mars". > > I tried simplyfing the code in the button's click event as follows: > > String s = Textbox1.Text; > > I still get the old value back. > > Any Idea what's going wrong? > > Thanks, > AJ