K
Ken Varn
I have a strange problem with a databound listbox. It may be because of how
I use it, but I am stumped by this behavior. Here is the scenario:
I have a multiselect databound listbox that belongs to a panel control. In
the Page_Load event, the panel listbox control may be moved from one panel
to another depending on selections that the operator makes. Everything
seems to work fine except for one thing. The selections that are made in
the listbox are not retained on postback. They are always cleared. If I
remove the databinding from the listbox and place items in it manually, then
it works fine. I do not do databinding if Page.IsPostback is set to true.
Can someone explain why it does not retain selections on postback? I
suspect it is because I am moving the listbox control to a new parent, but I
don't understand why this is causing a problem.
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
I use it, but I am stumped by this behavior. Here is the scenario:
I have a multiselect databound listbox that belongs to a panel control. In
the Page_Load event, the panel listbox control may be moved from one panel
to another depending on selections that the operator makes. Everything
seems to work fine except for one thing. The selections that are made in
the listbox are not retained on postback. They are always cleared. If I
remove the databinding from the listbox and place items in it manually, then
it works fine. I do not do databinding if Page.IsPostback is set to true.
Can someone explain why it does not retain selections on postback? I
suspect it is because I am moving the listbox control to a new parent, but I
don't understand why this is causing a problem.
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------