J
John Kotuby
Hi all,
I was wondering if what I am seeing is to be expected or maybe I'm setting
things up wrong with the Update Panels. I am programming in VS 2008 with VB.
I have a page with multiple update panels. At the bottom of the page I have
an update panel with UpdateMode="Always" where I store hidden fields. I use
them for communication with the server and maintaining state upon Callbacks.
The fields appear to be always Read/Write accessible at the server during
the page callback.
One of the other update panels is set to UpdateMode="Conditional"
ChildrenAsTriggers="false" and I have defined some trigger buttons
(AsyncPostBackTrigger) that are clicked from within JavasScript functions.
There is an asp listbox (Id = "lstSelected") in that panel which I populate
clientside using the JavaScript DOM, depending on what the user selects from
a Grid .
Upon callback with the Trigger defined for the update panel, I discover that
in Page_Load Me.lstSelected.Items.Count = 0. There are no Items found in the
lisbox even though they were clearly there in the Browser document having
been placed there with JavaScript. Is this to be expected that listboxes
populated in this manner show as empty at the server during callback?
I have resorted to populating some hidden fields with delimited strings
representing the contents of the listbox. These are populated at the same
time as the listbox entries are created via JavaScript...but as I said, for
some reason they persist.
Can anyone tell me why I might be seeing this type of behavior?
Thanks for any replies.
I was wondering if what I am seeing is to be expected or maybe I'm setting
things up wrong with the Update Panels. I am programming in VS 2008 with VB.
I have a page with multiple update panels. At the bottom of the page I have
an update panel with UpdateMode="Always" where I store hidden fields. I use
them for communication with the server and maintaining state upon Callbacks.
The fields appear to be always Read/Write accessible at the server during
the page callback.
One of the other update panels is set to UpdateMode="Conditional"
ChildrenAsTriggers="false" and I have defined some trigger buttons
(AsyncPostBackTrigger) that are clicked from within JavasScript functions.
There is an asp listbox (Id = "lstSelected") in that panel which I populate
clientside using the JavaScript DOM, depending on what the user selects from
a Grid .
Upon callback with the Trigger defined for the update panel, I discover that
in Page_Load Me.lstSelected.Items.Count = 0. There are no Items found in the
lisbox even though they were clearly there in the Browser document having
been placed there with JavaScript. Is this to be expected that listboxes
populated in this manner show as empty at the server during callback?
I have resorted to populating some hidden fields with delimited strings
representing the contents of the listbox. These are populated at the same
time as the listbox entries are created via JavaScript...but as I said, for
some reason they persist.
Can anyone tell me why I might be seeing this type of behavior?
Thanks for any replies.