Robert
|
Posted: 11/03/2003, 11:58 AM |
|
Hi listers,
I tried to find the aswer in the archive buti couldn't get a clrea answer so here is the simple question.
I have a list box on page1, I need to hold it's value in a Session variable (or global) to be accessible from few other pages!
I tried to use CCDSetSession/CCGetSession no resullt!
I tried the Set Session("XXX")="8888" just a simple Character string but I couldn't retrievethem back on <H1><%=Session("XXX")%> is the listbox value</H1>
There should be a problem somewhere in my program maybe! (Environment setting or somthing like that)
I'd appreciate it if u could help me on this
P.S. I'm trying to fit this code in a CodeCharge Studio 2.2.2.40 Tryial Version!
Thank you,
Robret
|
|
|
lneisius
|
Posted: 11/03/2003, 12:14 PM |
|
The CCSetSession and CCGetSession functions are not available in ASP but only PHP. To retrieve a session var in ASP set the default value of the text box as Session("XXX") or to save a session var use the on validate event of the listbox to save the value as a session var.
Note: to use the on validate event
1) Select the text box
2) In the properties manager (Lower right side of application) select the Events tab
3) Right click on the after validate under server and select add action
4) Select save Variable value
5) Type the info in the event and your done!
|
|
|
Robert
|
Posted: 11/03/2003, 3:08 PM |
|
Thank you lneisius.
I added a text box to the second page and tried to set the on validate/ save control value action ( on the list box which is fed on value list data source)
I got to this error message !
Error:DepartmentsReport/ListBox1 Event: OnValidate Action: "Save Variable Value": Source Name is required.
I also didnt get it when u said 5) type the info in the event ? do u mean the on validate event code?
I'd really apprecite it if you'd explain this to me.
Again the sitution is : I want pass the Page1/Listbox1(Value List) value as a session variable to page2/ txtDepartment Text box or anything possible(Label)!
Thanks alot
Robert
|
|
|
|