Displaying Pages Dynamic to users

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2008
Posts: 92
Reputation: bharanidharanit is an unknown quantity at this point 
Solved Threads: 2
bharanidharanit bharanidharanit is offline Offline
Junior Poster in Training

Displaying Pages Dynamic to users

 
0
  #1
May 11th, 2009
Hello,
I am using visual webdeveloper 2008,
I have created users using asp.net configuration.
Now i am having 2 roles admin and users,
And i am having 3 pages as login,register,secured
So wen i enter the website as admin all these 3 pages must be visible to the user.
Wen i enter as guest it must show only register and login
After i login it must not show register and login

How to set pages like that???
Thanks.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 13
Reputation: Poojasrivastava is an unknown quantity at this point 
Solved Threads: 0
Poojasrivastava Poojasrivastava is offline Offline
Newbie Poster

Re: Displaying Pages Dynamic to users

 
0
  #2
May 18th, 2009
you can save the role in a session variable and accordingly show the respective pages..
eg.
  1. if(txtusername.Text=="ADMIN")
  2. {
  3. show desired pages
  4. }
  5. else
  6. if(txtusername.Text=="USER")
  7. {
  8. show desired pages
  9. }
Last edited by peter_budo; May 19th, 2009 at 7:40 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 92
Reputation: bharanidharanit is an unknown quantity at this point 
Solved Threads: 2
bharanidharanit bharanidharanit is offline Offline
Junior Poster in Training

Re: Displaying Pages Dynamic to users

 
0
  #3
May 18th, 2009
Ya i also want to remove certain menus from the menu control, if the user logged in is admin.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 13
Reputation: Poojasrivastava is an unknown quantity at this point 
Solved Threads: 0
Poojasrivastava Poojasrivastava is offline Offline
Newbie Poster

Re: Displaying Pages Dynamic to users

 
0
  #4
May 19th, 2009
if thats the case then you just need to show the required pages..i mean its upto u what pages u want to give access to...to remove the menus simple dont show them...
i had a similar requirement but then i had a table maintained which user can access what menu...so based upon the query results i showed them the required pages!!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC