Session Variables

rangerstud620

Freshman
Joined
Jun 14, 2005
Messages
27
I've got a web form with a list box on it. When I click on an item in the list box, I need to open another window and display some details about the selected item. Should I use a session variable to capture the selected item from the list box? Or is there a more efficient way to do that?
 
Why don't use just use javascript and use the onselectchanged or whatever event it is? If you need it to specifically post back then you could open a new window with a query string in the link; hash it if you're worried about alteration. And yes you could use a session variable. But you need to keep in mind; what happens to that session variable when they close the page - will it be used somewhere else by the application? Will it cause bugs if it isn't cleared because the user didn't follow the work flow you thought they would? How big of a chunk of memory that this 'Session' variable going to take up? Multiple this times the maximum number of expected users...will this cripple the server memory? Always be careful about how you are using Session.
 
bri189a said:
Why don't use just use javascript and use the onselectchanged or whatever event it is? If you need it to specifically post back then you could open a new window with a query string in the link; hash it if you're worried about alteration.

Thanks for the input! I think I will try to use a query string to make it work. I think that will work better than a session variable.
 
Back
Top