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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide Url Using Redirect

Status
Not open for further replies.

zakkar

Programmer
Dec 3, 2002
72
0
0
GR
Hello to you all,
I have this problem and i'm trying to figure it out what is going on.
I have an asp page test.asp which on submit button i call another asp(non visual-just asp) where i do some validations in there.When i pass the validations i want to redirect to another asp where the user can download files.
The problem is that when i do the redirection and because it is a download page i do not want from the user to see it.I want first the user walk through validations and afterwards go to download page.
How can i prevent the user from seeing the url in the browser 's address bar??
I do not want to use frames because the solutions i saw have some problems.
Any ideas??
Is there any jscript which can do the work?
Or Asp anything??
Thank you
 
I'd use frames for this, so the URL you want to show is what's in the address bar. You can load the URL you want to hide in the frame then.

Lee
 
Instead of Response.Redirect you might want to look into the commands Server.Transfer and Server.Execute

The Response.Redirect command words by sending a HTTP command to the browser letting it know that it needs to make a request for a different URL. The browser makes this request without intervention from the user unless user has fiddled with their browsersecurity settings. If you want to change pages without alerting the browser then you'll need to use one of the Server commands that I mentioned above.

Or you could just use frames...
 
Sheco's right!

The best is to use server.transfer("thepage.aspx"). The browser will display the previews link-url.
At redirect you may us query strings so as somehow to pass these you want to do the validations. Maybe this is possible also with server.transfer("..?...") (?).

Anyway you can also use the Global.asax to declare and initialize variables, or write (and transform) the code from asp to the page as a function. This is code-behide.


-bclt
 
bclt,

Are you talking about classic ASP or about ASP.NET ??
 
I used server.Transfer and when i copy and paste the url to the address bar worked for me .Meaning that if the user tries to link directly to the download.asp then an error occured.
I'm wondering if there is any way to find out if my download.asp was called from my validations page or directly from the address bar.
Can i handle the page not found display message and redirect it an error page.?
Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top