//hyperlink of adming page admin.aspx .. hide if user with anther role is logged in
if (User.IsInRole("admin"))
{
Hyperlink1.Visible = true;
ad.Visible = true;
}
else
{
Hyperlink1
.Visible = false;
ad.Visible = false;
}
and suppose if user try to open webpage by writing manually for that you can use the Location Tag in the web.config file :
<location path="admin/Adminmenu.aspx">
<system.web>
<authorization>
<deny users="?" roles="user"/>
<allow users="*" roles="admin"/>
</authorization>
</system.web>
</location>
now if local user try to access the page of admin he will be redirected to login page to login with admin username and password..
hope this will help you!