T
trullock
Hi,
I have a usercontrol which contains two dropdown lists and a textbox.
One of the dropdowns is databound, the other is a static list.
i add this control to my page via a button click.
Inorder to make the control remain on the page after subsequent
postbacks im adding the control again in the page load (is this
right?)
Because i have to readd the controls, i have to re-databind the
dropdown in the control. This causes it to forget which value it was
set to. The other dropdown and the textbox remember their selected
value and text properties respectively.
How can i make the first dropdown remember it's setting?
If i save the selected index into the controls viewstate when it is
changed, its not remembered when the controls re-added. Im guessing
thats because its a new instance of the control, but the other
dropdrop and textbox remember their values :s
I know i could use the session but thats messy.
Thanks for any advice
I have a usercontrol which contains two dropdown lists and a textbox.
One of the dropdowns is databound, the other is a static list.
i add this control to my page via a button click.
Inorder to make the control remain on the page after subsequent
postbacks im adding the control again in the page load (is this
right?)
Because i have to readd the controls, i have to re-databind the
dropdown in the control. This causes it to forget which value it was
set to. The other dropdown and the textbox remember their selected
value and text properties respectively.
How can i make the first dropdown remember it's setting?
If i save the selected index into the controls viewstate when it is
changed, its not remembered when the controls re-added. Im guessing
thats because its a new instance of the control, but the other
dropdrop and textbox remember their values :s
I know i could use the session but thats messy.
Thanks for any advice