I have a aspx page which loads different user controls depending upon some condition (per se a menu click). after loading a user control, I want to enter some data in the form (in fact user control's Textbox) and when the form is posted back , I want to access
the textbox's value in the page_load method of the user control(text box is a part of user control). Theoritically , i think i shud b able to access textbox's value but i'm not getting it....and the value is accessible in the respective event of the Textbox(
textchanged event)...which shud happen but why not in the load method....my program does things in load method ..so it is imp that access it in load method....and this is frustating.. any reasons u guys can think of.....my main(aspx )page's enable view state
is set to false which in any way will never have an effect on the posted back values and auto eventwireup is false and i'm not sure of it's affect on accessing the data....some body plz help me...THANKING YOU pavan
It doesn't happen in the load method because it happens before postback event handlers and state is applied to the controls. Have a look at the life cycle of web forms (and web controls) in the docs.
Here is the Page's link I read For this - Looking at it I feel i shud b able to acccess the values in page_load it self.. http://www.15seconds.com/issue/020102.htm thanx
pavankurimil...
Member
10 Points
2 Posts
page_load problem
Aug 28, 2003 10:35 PM|LINK
russnem
Contributor
7001 Points
1389 Posts
ASPInsiders
MVP
Re: page_load problem
Aug 28, 2003 11:32 PM|LINK
pavankurimil...
Member
10 Points
2 Posts
Re: page_load problem
Aug 29, 2003 02:56 AM|LINK