Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 5th, 2006, 10:00 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
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..
Reply With Quote
  #2 (permalink)  
Old July 6th, 2006, 12:18 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
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.

Reply With Quote
  #3 (permalink)  
Old July 6th, 2006, 03:00 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
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

Reply With Quote
  #4 (permalink)  
Old July 6th, 2006, 09:44 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
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.

Reply With Quote
  #5 (permalink)  
Old July 6th, 2006, 09:47 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
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..

Reply With Quote
  #6 (permalink)  
Old July 6th, 2006, 12:58 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
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.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 03:47 PM
Login Problem moonsrisun ASP.NET 2.0 Professional 1 May 25th, 2007 12:48 AM
Login Problem moonsrisun ASP.NET 2.0 Basics 0 May 24th, 2007 02:33 AM
Login Problem sumith ASP.NET 1.0 and 1.1 Professional 3 March 11th, 2007 11:57 PM
Problem with Login -- HELP chiefg BOOK: ASP.NET Website Programming Problem-Design-Solution 1 February 3rd, 2004 04:26 AM



All times are GMT -4. The time now is 08:05 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.