Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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 July 5th, 2006, 09:00 AM
Registered User
 
Join Date: Jul 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to slice2116 Send a message via Yahoo to slice2116
Default Login problem

hey every1.. my problem is that i have 2 user modes.. one for 'administrator' and other for 'normal user'.. now they both ll view different pages when they login to their account.. hw do i do this.. from the login page.. whoever logs in goes to the same page but i want to redirect different user to different places depending upon their roles..

plss guys any help will be much appreciated..
 
Old July 5th, 2006, 11:18 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

You will have to set up roles for different users. When the user logs in, get all the roles the user belongs to and redirect them as needed. Also use the roles to show only the pages they are allowed to access.

 
Old July 6th, 2006, 02:00 AM
Registered User
 
Join Date: Jul 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to slice2116 Send a message via Yahoo to slice2116
Default

i m having problems n redirecting the user.. can u pls help me on messenger... my id is slice2116 for yahoo..

1. when a person enters his login information.. i m nt able to find what role he has on that page itself.. i have to create a new page where i first find out the role of the user.. can i do it on the login page itself??

2. after i get the roles in a string array, how do i pick out only a single string from the array.

3. i tried to redirect the user, but it gave me error. how do i do that.

I m very sorry for asking so many questions but if you ll answer any of the above, i wud be really grateful

 
Old July 6th, 2006, 08:44 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

You have a lot of questions and really need to do some research. For the roles part of it, you need to look into membership providers and how to implement them. You need to set a DB to handle log ins roles etc using aspnet_reg.exe. Take some time to investigate.

 
Old July 6th, 2006, 08:47 AM
Registered User
 
Join Date: Jul 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to slice2116 Send a message via Yahoo to slice2116
Default

ok thanks.. can i ask u for some help..if that is possible..

 
Old July 6th, 2006, 11:58 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Sure post any questions you have here. There are lots of examples and posts out there that will help you. Also, VS help is a good place to start. Look up using the the login control. There will be links on how to use it and what you need to do to set up the DB and memebership providers. That is how I got my start with it.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Login Problem dpandit BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 3 March 17th, 2008 02:47 PM
Login Problem moonsrisun ASP.NET 2.0 Professional 1 May 24th, 2007 11:48 PM
Login Problem moonsrisun ASP.NET 2.0 Basics 0 May 24th, 2007 01:33 AM
Login Problem sumith ASP.NET 1.0 and 1.1 Professional 3 March 11th, 2007 10:57 PM
Problem with Login -- HELP chiefg BOOK: ASP.NET Website Programming Problem-Design-Solution 1 February 3rd, 2004 04:26 AM





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