Hello Everyone! I created a folder in my site and it's called "admin". And I added the forms about administrating into this folder. I hid the forms in this folder to users with asp.net configuration manager but I want to add a shortcut for admins. I have
a hyperlink at the bottom of the site called "Admin Control Panel" which directs you to admin panel. But I want to make this button/hyperlink visible only for members who are in the "admin"s group. How can I do that? With loginview or something? Or should
I use something different from hyperlink? I am waiting your useful tips. Thanks!
The easy way to do that would be use roles in asp.net membership provider and then configure that folder to be visible only to those under the admin Role.
Scrap that, I misread your question. You can do this using Code Behind to check if the !User.IsInRole == "Admin", change the visibility of that link to hidden if the check comes back as true.
Mac14
Member
46 Points
71 Posts
How to make this hyperlink visible only for members who are in the admin group
Nov 29, 2012 07:16 PM|LINK
Hello Everyone! I created a folder in my site and it's called "admin". And I added the forms about administrating into this folder. I hid the forms in this folder to users with asp.net configuration manager but I want to add a shortcut for admins. I have a hyperlink at the bottom of the site called "Admin Control Panel" which directs you to admin panel. But I want to make this button/hyperlink visible only for members who are in the "admin"s group. How can I do that? With loginview or something? Or should I use something different from hyperlink? I am waiting your useful tips. Thanks!
bbcompent1
All-Star
33097 Points
8529 Posts
Moderator
Re: How to make this hyperlink visible only for members who are in the admin group
Nov 30, 2012 04:42 PM|LINK
The easy way to do that would be use roles in asp.net membership provider and then configure that folder to be visible only to those under the admin Role.
bbcompent1
All-Star
33097 Points
8529 Posts
Moderator
Re: How to make this hyperlink visible only for members who are in the admin group
Nov 30, 2012 04:43 PM|LINK
Scrap that, I misread your question. You can do this using Code Behind to check if the !User.IsInRole == "Admin", change the visibility of that link to hidden if the check comes back as true.
Mac14
Member
46 Points
71 Posts
Re: How to make this hyperlink visible only for members who are in the admin group
Dec 04, 2012 03:32 PM|LINK
Thanks for your caring :)