Groups | Blog | Home
all groups > asp.net > march 2006 >

asp.net : displaying current session value requires 2nd postback


Jon Paal
3/15/2006 11:19:03 PM
I captured an arraylist into a session value but to display the current values, the page requires a postback or else it displays the
prior version of the value.

how do I force a post back automatically so I can always get the current value stored in the session object ?

Patrice
3/16/2006 12:00:00 AM
I would rather investigate the first problem. There is no reason for which
you shouldn't get the current value stored in your session.

It looks like to me that you have some kind of ordering problem. You likely
have the rendering taking place (or you copy a value for later rendering)
before updating the value causing the displayed values to be outdated.
Reordering those steps should fix the problem.

--
Patrice

"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> a écrit dans le message
de news: O19GnnMSGHA.1780@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view]

Jon Paal
3/16/2006 8:37:55 AM
The session value is populated on the postback.
it comes from a server side custom control.

I don't know how to reordering any sequence within the postback.

any other thoughts ?


[quoted text, click to view]

Patrice
3/17/2006 12:00:00 AM
I woud start by tracing events to diagnose the problem. In particular my
first move would be to check that the variable affectation is done in an
event that is earlier the one used to render the updated value.

Or do you mean they are in the same procedure one after the other ? Seeing
some code narrowed down to just what shows the problem could help (and
possibly could lead you to find out the problem as you go with simplified
code).

--
Patrice

"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> a écrit dans le message
de news: eWiR5fRSGHA.1608@TK2MSFTNGP09.phx.gbl...
[quoted text, click to view]

Jon Paal
3/17/2006 10:47:55 AM
thanks for helping.

I have found a way to get the arraylist without the session object.
I created a second instance of the control and was able to retrieve the information via a function.

i now get the current values in the postback :)


[quoted text, click to view]

AddThis Social Bookmark Button