ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 21st, 2003, 03:05 PM
silvertiger's Avatar
silvertiger silvertiger is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Denver
Posts: 62 silvertiger User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 32 m 12 sec
Reputation Power: 5
Session Variables not kept through form submit to load asp page.

ok.. here's what i have:

1. A portal that loads an asp page into a frame called "main"

2. The Macromedia flash button used to link to this asp page has for elements equivelant to the following

<form name="link" action="login.asp">
<input type="hidden" name="Master_Affiliate" value="532">
<input type="submit" value="submit">
</form>

3. I know that the variable works, because when i use the following code:
----------------------------------------------------------------------------------
if (isempty(Request.Form("Master_Affiliate"))) then
Session("Message") = "Data Missing."
else
Session("Master_Affiliate") = Request.Form("Master_Affiliate")
end if
Response.Write("MA=" & Session("Master_Affiliate") & ".<br>")
----------------------------------------------------------------------------------
Displays the following on login.asp page when it loads:
----------------------------------------------------------------------------------
MA=532
----------------------------------------------------------------------------------

4. The problem now is that when I load another ASP page (data.asp) the session variable Master_Affiliate gets lost. This is the code I am using to try and track it:

Response.Write("MA=- " & Session("Master_Affiliate"))
if ( isempty(Session("Master_Affiliate")) ) then
Session("Message") = "Data Missing."
Response.Redirect("login.asp")
end if

this results in a redirection to the login page every time before i can even see that the variable is lost.

5. The ASP pages are loaded into the same frame.. and reside int he same directory on the web server.... what could cause the variable to just dissapear like that? there are no other references in the script that set the session variable, only ones that read it. I keep getting the "Data Missing" error message which means that I have been redirected to the login.asp because the session variable is missing.
__________________
Thanks,

Silver Tiger

Reply With Quote
  #2  
Old August 25th, 2003, 02:54 PM
aspman aspman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Ashburn,VA
Posts: 105 aspman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 22 m 40 sec
Reputation Power: 5
the only thing I can think of is

Review your code and make sure you are not overwriting the session variable. I personally did that a couple of times. So, that is the reason. I am saying, may be you have to very closely look at the code. Remove the redirect first and try to debug when is the value changing at different points of the page, by introducing

response.end and display the value of the session (variable)

Reply With Quote
  #3  
Old August 25th, 2003, 06:18 PM
silvertiger's Avatar
silvertiger silvertiger is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Denver
Posts: 62 silvertiger User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 32 m 12 sec
Reputation Power: 5
well... stupid me.. it worked on my machine.. and not another.. had to tell the other guys to allow cookies (hence the loss of variables... no cookis = no session.. lol)..

thanks.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Session Variables not kept through form submit to load asp page.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway