Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirecting along with Querystrings isn't working good. 1

Status
Not open for further replies.

Deadline

Programmer
Feb 28, 2001
367
US
Hi,
I am having a login screen that is reached indirectly. I mean, When the user attempts to reach a page that requires a login, that page will redirect the user to the login page, carrying the current page's URL along with Querystrings if Any..

In the login page, I am capturing that URL(lets call it Success URL) and putting it in a hidden box.

And I also have a failure hidden text box, which contains the failure URL.

But when ASP loads the login page with an URL of this kind :
Code:
login.asp?success=[URL unfurl="true"]http://dev2/TripApprove.asp?STATUS=P&CTRY=BD[/URL]

on successful login, I expect the page to go to this URL -
Code:
[URL unfurl="true"]http://dev2/TripApprove.asp?STATUS=P&CTRY=BD[/URL]

On the contrary, it goes to
Code:
[URL unfurl="true"]http://dev2/TripApprove.asp?STATUS=P[/URL]
I mean, it considers only one querystring parameter of the success URL.

How should I pass Ampersand and Question Mark ?


Desperate



Help please... Thank you...
RR
 
do server.urlencode(success)

eg:
response.redirect "login.asp?success=" & server.urlencode(success)



hth
leo leo
 
Leo,
Thank you. But still it chops of all but first QUerstring of the SuccessURL.

Could you please help ?
Thank you...
RR

 
Leo,
I did it..

Thank you very much. Your technique worked...



Here's what I used..
Code:
<%
IF IsNull(Request.Cookies(&quot;Emp_ID&quot;)) OR CSTR(Request.Cookies(&quot;Emp_ID&quot;)) = &quot;&quot; THEN	
Response.Redirect &quot;login.asp?SOURCE=&quot;& Server.URLEncode(&quot;[URL unfurl="true"]HTTP://&quot;[/URL] & Request.ServerVariables(&quot;SERVER_NAME&quot;) & Request.ServerVariables(&quot;SCRIPT_NAME&quot;) & &quot;?&quot;& Request.ServerVariables(&quot;QUERY_STRING&quot;))


....
%>


A million times


Thank you...
RR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top