G
goldenrate
Hi,
I was trying to set properties to a user control I was writing, name it
'uc1'. I placed uc1 in another user control I'd wrote: 'mainUc'. In uc1 I
have set a few WebControls and some public properties (e.g., Double[]
_prices; Prices) and initialized them on Page_Load.
When the application runs (a web form) it loads 'mainUc' that contains
'uc1'. As long as no post back is being applied uc1.Prices contains the
value that was set on Page_Load (not on PostBack), but if i triy to access
this property (or any other) I get nothing or exception in case of array.
Is there a way to define properties that will still be 'alive' after
postback (without using WebControls)? Am I doing something wrong by applying
win application techniques to web environment?
Thanks,
David
I was trying to set properties to a user control I was writing, name it
'uc1'. I placed uc1 in another user control I'd wrote: 'mainUc'. In uc1 I
have set a few WebControls and some public properties (e.g., Double[]
_prices; Prices) and initialized them on Page_Load.
When the application runs (a web form) it loads 'mainUc' that contains
'uc1'. As long as no post back is being applied uc1.Prices contains the
value that was set on Page_Load (not on PostBack), but if i triy to access
this property (or any other) I get nothing or exception in case of array.
Is there a way to define properties that will still be 'alive' after
postback (without using WebControls)? Am I doing something wrong by applying
win application techniques to web environment?
Thanks,
David