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 May 31st, 2005, 09:45 AM
Authorized User
 
Join Date: Apr 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rain_uk
Default Profile Query

Hello :D

This is probably an easy question, but i am new to Asp.

I have been tasked with creating an intranet for work. What they want is each person to have a profile page, so they can update phone numbers, location etc when they have a change around.

What i need is to create a default page that uses their NT Domain Username and queries it against an SQL database to see if there username exists or not. Then if no record exists redirect them to an insert page, or if it exists redirect them to the index page. And the second part is write there name to a Session Variable so there name can be used on other parts of the site - Welcome Bob Smith etc.

I know how to create insert & update pages, but i dont know where to start with redirects...

Any help is appreiciated
Lee

 
Old June 1st, 2005, 02:21 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can use "response.redirect()" for redirecting the user to the relevant page.

Before that you got to check if the user exists in the DB.
Use a recordset that selects the row corresponding to the user that logged in and if no rows found, redirect to insert page, else redirect to index page.

Hope that helps.

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Profile in BLL Faith ASP.NET 2.0 Professional 3 August 18th, 2008 10:57 AM
how to use shoppingcart without profile? hertendreef ASP.NET 2.0 Basics 6 January 11th, 2007 05:16 AM
Profile in BLL Faith BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 September 14th, 2006 03:57 AM
User Profile edgelogix Pro PHP 1 December 3rd, 2005 04:17 PM
Profile Pictures SerranoG Forum and Wrox.com Feedback 5 November 3rd, 2003 11:12 AM





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