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.

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
}

Ya i also want to remove certain menus from the menu control, if the user logged in is admin.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.