0

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.

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Poojasrivastava
0

you can save the role in a session variable and accordingly show the respective pages..
eg.

if(txtusername.Text=="ADMIN")
{
show desired pages
}
else
if(txtusername.Text=="USER")
{
show desired pages
}
0

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!!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.