|
-
Feb 23rd, 2005, 08:14 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Sessions Not Working
When i use some javascript code embedded in a Page.RegisterStartupScript to redirect a page, the new page does not seem to identify the sessions that i try to assign to values on that page
VB Code:
Session.Add(ApplicationSettings.SESSION_INFORMATION_MESSAGE, New String("Repair successfully updated.<br> Click OK to Return to Main Page"))
Session.Add(ApplicationSettings.SESSION_INFORMATION_DESTINATION, ApplicationSettings.PAGE_START)
Page.RegisterStartupScript("RedirectScript", "<script>redirectPage('http://xxx.xxx.xxx.xxx/Repairs/" & ApplicationSettings.PAGE_INFORMATION & "');</script>")
-
Feb 23rd, 2005, 09:34 AM
#2
Addicted Member
Re: Sessions Not Working
I am sure someone can correct me if I am wrong but i believe that session variables do not get populated unless you post back to the server.
I believe having a similar problem and I ended up finding a different way to do things. Though this was with user defined session variables so I could be wrong.
-
Feb 23rd, 2005, 01:27 PM
#3
I wonder how many charact
Re: Sessions Not Working
Well, first, it sounds like you are telling the user something was displayed, then they click OK, at which point they get redirected.
So - perhaps you don't want RegisterStartupScript rather RegisterClientScriptBlock - I don't know for sure because I don't know the functionality you require. Startup runs before the page finishes loading in most cases.
Session should be ok otherwise - I would check the field names your passing PAGE_START, PAGE_INFORMATION ... be sure they contain the appropriate values.
-
Feb 24th, 2005, 04:28 AM
#4
Thread Starter
Fanatic Member
Re: Sessions Not Working
What i am trying to do it on the page they click on a button then it will open a new window and the old page will redirect back to the mainpage again.
Can you tell me more about the RegisterClientScriptBlock and how to use it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|