|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
no clue, did you try cstr on both them to make sure?
If Cstr(session("tcode1")) = Cstr("PU") Then |
|
#3
|
|||
|
|||
|
Cheers!
now that was quick, 6 minutes from original post to answer. Many thanks! |
|
#4
|
|||
|
|||
|
what else would i be doing at 6:30 in the morning besides checking devshed for response.redirect questions?
|
|
#5
|
|||
|
|||
|
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!*** |
|
#6
|
|||
|
|||
|
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 |
|
#7
|
|||
|
|||
|
I never sleep...PEPSI and music keeps me awake, that always happend...getting stuck with a half finish project!
Good Luck Andyman64! Vlince |
|
#8
|
|||
|
|||
|
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
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Response.Redirect Problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|