Megan
Posts: 35
|
Posted: 06/02/2008, 5:39 PM |
|
I've been digging all day on this one, and I'm sure it's easier than I'm making it.
I have a listbox that is pulling values from a SQL Server table (which is working fine). When the user selects an item in that listbox, I need a session created that saves the value selected of the bound column of that listbox. If anyone has been successful doing this I would really appreciate some sample code.
|
|
|
wkempees
Posts: 1679
|
Posted: 06/02/2008, 6:15 PM |
|
Megan,
When the user selects a value from the listbox is a client side operation (OnChange).
That would require JavaScript in the OnChange event.
However OnChange being clientside and sessionvars being serverside you may have A problem.
You could however (I am not ASP) assign the value of the bound column to a session var upon Submit, I Think.
There might be an Ajax solution to this, but I let others help you on that, as I am also handicaped on the ASP side.
Hint, update Panel.`
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
|
|
Megan
Posts: 35
|
Posted: 06/05/2008, 2:57 PM |
|
Thank you for your response. Based on my research, it sounds like I will have to create the session based on the OnChange event of the listbox. Because this is a client-side event and I'm trying to get the value of the item selected which is a server event (so to speak), the code will have to be written using HTML...somehow....to send it to the server. I'm wondering if anyone has done this and if so, how. Any ideas out there?
|
|
|
|