Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 26th, 2004, 01:48 AM
Authorized User
 
Join Date: Mar 2004
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Default Getting to Specific Page

I am having a problem on the following.
I have a password protected website. and lets say i have 5 different pages(e.g 1.asp, 2.asp, 3.asp, 4.asp and 5.asp) if the user wants to go the page 4.asp at the very begining. page will redirect to login page to validate the login.

Now, what i am trying to do is to send the user to that page 4.asp after they successfully login?
can any one help me

thanks in advance

 
Old March 26th, 2004, 03:15 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acdsky
Default

Hi

If you just trying to protect the pages to avoid users going to a page if they not authorised to do so you can use a include file ontop of every page. The include file could look something like this:

Group=Session("Gr")
If Group <> "Page1 Users" Then
Response.redirect("Denied.asp")
End If

This example use a session variable on the login page.

Let me know if this is not what you are looking for.

Regards
Marnus
 
Old March 27th, 2004, 09:13 PM
Authorized User
 
Join Date: Mar 2004
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Thanks for the response.
i have done that already but what i am trying to do is once user successfully log into my site, how do i automatically send them to the previous page they wanted to see prevously before they logged in

if it's unclear please let me know

thanks in advance

 
Old March 28th, 2004, 01:04 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Usually you do this with some querystring value on the page you redirect to.

Redirect("login.asp?returnPage=" & Request.QueryString("SCRIPT_NAME"))

This will put the current page name into the querystring for the login page. Then you can do your login and make sure you pass along the value from "returnPage" such that at some point you can redirect back to that page.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Search specific data from specific columns yogeshyl SQL Language 1 January 16th, 2008 11:12 AM
Copy specific data in specific cells of sheet2 yogeshyl Excel VBA 1 May 14th, 2007 07:40 AM
Dynamic table on specific height of JSP page shoaibkhan2000 Pro JSP 0 August 1st, 2006 06:15 AM
Linking to specific areas in a new page CathyM BOOK: Beginning ASP 3.0 2 August 2nd, 2005 09:23 AM
Fail to get the specific page polofson BOOK: Professional Crystal Reports for VS.NET 0 July 17th, 2004 08:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.