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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 22nd, 2003, 05:33 AM
Andyman64 Andyman64 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Herts UK
Posts: 3 Andyman64 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Response.Redirect Problem

I am using the code below, to redirect depending on value.

if = PU go to one page if = something else go to another.

<%response.buffer=true

If session("tcode1") = "PU" Then
Response.Redirect "pumplist1b.asp"
Else
Response.Redirect "pumplist1a.asp"
End If
%>

The problem being it always redirects to pumplist1a.asp no matter what value of session("tcode1")

Any ideas?

regards

AndyMan

Reply With Quote
  #2  
Old August 22nd, 2003, 05:38 AM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 6
Send a message via AIM to unatratnag
no clue, did you try cstr on both them to make sure?

If Cstr(session("tcode1")) = Cstr("PU") Then

Reply With Quote
  #3  
Old August 22nd, 2003, 05:43 AM
Andyman64 Andyman64 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Herts UK
Posts: 3 Andyman64 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cheers!
now that was quick, 6 minutes from original post to answer.

Many thanks!

Reply With Quote
  #4  
Old August 22nd, 2003, 07:41 AM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 6
Send a message via AIM to unatratnag
what else would i be doing at 6:30 in the morning besides checking devshed for response.redirect questions?

Reply With Quote
  #5  
Old August 22nd, 2003, 07:56 AM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Yes that is scary unatratnag :-)

We, foreign guys, like to help regardless of the Time/Date

But I have to ask, why use the Cstr() function?

Doesn't the programmer know what he put inside the session("tcode1") in the first place? I mean if I do:

<%
session("tcode1") = "PU"

If session("tcode1") = "PU" Then
Response.Write "YES"
Else
Response.Write "NO"
End If
%>
Then I don't need to use the Cstr() function because I know the session("tcode1") is holding a string

But then again, god knows what he does with the session variable so...I'd even add something else to be on the safe side:


<%
If Ucase(Cstr(session("tcode1"))) = Ucase(Cstr("PU")) Then
. . .
. .
.
%>

just a thought!

Vlince


***Oh and add a Trim() also!***

Reply With Quote
  #6  
Old August 22nd, 2003, 08:12 AM
Andyman64 Andyman64 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Herts UK
Posts: 3 Andyman64 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hey you people want to be up in the middle of the night thats ok with me..... strictly 8:30 til 5pm for me.

regarding the session("tcode1") this will always be a string value, and always a 2 letter code and is used right the way through a series of pages defining what parts list and drawings should be pulled from the database.

I am new to this you know... and have been left with a half finished (no tell a lie now its 90% finished) ASP application due to the development company folding... I will get there! (especially with the help of insomniac dev programmers!)

regards

Andy

Reply With Quote
  #7  
Old August 22nd, 2003, 08:16 AM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
I never sleep...PEPSI and music keeps me awake, that always happend...getting stuck with a half finish project!

Good Luck Andyman64!

Vlince

Reply With Quote
  #8  
Old August 22nd, 2003, 05:58 PM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 6
Send a message via AIM to unatratnag
well, alot of the times you don't write the whole code yourself, we use tagins for login scripts and stuff like that at my company, i have no clue how they're being authorized sometimes, so it doesn't hurt to add in some stuff like that when you're not the sole programmer

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Response.Redirect Problem


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 6 hosted by Hostway