473,666 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Control page content based on membership/role

Hi

I am using the sql server based built-in membership/roles system. How can I
choose which links appear on a page based on what roles the current user
belongs to?

Thanks

Regards
Dec 14 '05 #1
2 1343
For this you could use the LoginView control, or maybe the LoginStatus
control.
Here's mor einfo:
http://www.SteveOrr.net/articles/SecureYourSite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:OA******** ******@tk2msftn gp13.phx.gbl...
Hi

I am using the sql server based built-in membership/roles system. How can
I choose which links appear on a page based on what roles the current user
belongs to?

Thanks

Regards

Dec 14 '05 #2
When generating content for the page, anyway I can make a selection in code
depending on user's roles?

Thanks

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:OR******** ******@TK2MSFTN GP15.phx.gbl...
For this you could use the LoginView control, or maybe the LoginStatus
control.
Here's mor einfo:
http://www.SteveOrr.net/articles/SecureYourSite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:OA******** ******@tk2msftn gp13.phx.gbl...
Hi

I am using the sql server based built-in membership/roles system. How can
I choose which links appear on a page based on what roles the current
user belongs to?

Thanks

Regards


Dec 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3377
by: Noloader | last post by:
Hello, We are using Access ADP as a front end, SQL Server 2000 as a back end. We have a customer contact database. We would like to limit certain users to only receive certain records based on Windows NT group membership. For example, Eastern Sales Group can see clients located in their region, but they cannot see clients located in the Northern Region.
3
2347
by: craig | last post by:
I am working on my first .NET development project that involves custom role-based security per the project requirements. This lead to a general design issue this week that really caused us some concern. I have described the situation below because we are very curious to see what other, more experienced, developers might suggest. The specific classes and fields are used just to illustrate the concepts. Our application uses role-based...
1
4528
by: EricRybarczyk | last post by:
I am starting a rewrite of an existing Classic ASP web site in ASP.NET 2.0. The existing ASP application has several types of users, each with a separate login process (separate login page, separate DB tables, etc). For one of these user types, the current application has an additional input field required for login… they have a username, password, and another “location code” field. Please don’t make me explain or justify this…...
2
1134
by: WebBuilder451 | last post by:
I already have a user database and would like to include role based security on my asp.net pages. I see a lot of articals on how to do it withe sql tables that ship with 2.0, but not much without. Can anyone give me an example of how to set a user into a role, say as an Admin, but without using the sql tables noted above? Thanks KES -- thanks (as always)
5
1913
by: Afshar | last post by:
Hi everybody there, I have a special Login page that wants users to enter 3 passwords rather than a single password. But can't do it with Login control. I tried following scenarios: 1. Put an Login in the page and set its Visible = False instead put my own username and 3 password on the form. Then I checked 2nd and 3rd password seperately and passed username and password to Login control via its Username and Password properties but...
2
1310
by: Brett Wiltshire | last post by:
Hi, I have subclassed System.Web.UI.Page. (Well done me). Pages in my project should be accessed based on a user's membership to a Role. Membership to a Role is determined by a small API provided by the client along the lines of: if ( ! IsInRole(accountName, roleName) ) {
3
2175
by: Glenn | last post by:
My current classic-ASP site has users, projects, roles and the 2.0 membership looks like a perfect fit, but I'm having trouble finding examples of how to have users that belong to different projects, and have different roles per project. The current model.. * When a user joins my site, they eventually end up joining or creating one or more projects. But, they are not required to be a member of a project to be a member of the site.
4
1395
by: John Devlon | last post by:
Hi, I've created a small application with some user-authentication and roles. I would like to show/hide some navigation parts based on the users role. Could someone please tell me what the best solution is? Do I have to create different pages for each role and check the users role when logged in?
2
7657
by: Ken Fine | last post by:
I want to add the security question and answer security feature to the ChangePassword control. I am aware that this functionality is built into the PasswordRecovery tool. I have implemented the PasswordRecovery with a Password reset required; a temporary password is sent to the account on file. I want an extra layer of security to accommodate the very unlikely contingency that someone's e-mail account is compromised. Challenging with the...
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8783
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2773
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.