473,796 Members | 2,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Role based menu

S P
Hi All,

I am developing an ASP.NET 2.0 application.

I want to show the menu, depending on the user role.

How can I implement that?

Currently I store all the menu details in XML file and using DataList to
render link buttons in Tabular format.

Any pointer?

TIA
Sachin
Nov 13 '06 #1
1 2360

Is your menu details in SiteMap file or in XML File?

Create a sitemap file and store your menu structure in sitemap file. And
then rest of work related to showing only those menus which are allowed to
that particular user will be done by asp.net.

See this article how it will work and how SecurityTrimmin g will work.
Thankfully, ASP.NET 2.0's site navigation provides a feature called security
trimming. When obtaining site map information with security trimming
enabled, only those site map nodes that the currently logged on user has
authorization to visit are available. That means the site's TreeView or Menu
will contain just those sections accessible by the currently logged in user.
Read on to learn how to configure site navigation to support security
trimming!

http://aspnet.4guysfromrolla.com/articles/122805-1.aspx
Shahzad Godil
Karachi-Pakistan.

"S P" <SP@discussions .microsoft.comw rote in message
news:30******** *************** ***********@mic rosoft.com...
Hi All,

I am developing an ASP.NET 2.0 application.

I want to show the menu, depending on the user role.

How can I implement that?

Currently I store all the menu details in XML file and using DataList to
render link buttons in Tabular format.

Any pointer?

TIA
Sachin

Nov 14 '06 #2

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

Similar topics

0
3100
by: Murray | last post by:
I am trying to develop a web based database application to manage a Scout group. I need to control the level of access different visitors to the site are allowed to different parts of the database. I need to provide public information, including some contact details from the database, to unauthenticated (non-member) users and to provide a scale of access to more information for authenticated members. The access model would be similar...
3
2355
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...
0
1390
by: ChrisB | last post by:
Hello: I am a member of a team creating a .NET application, and we seem to have run into an issue when trying to implement role based security. Our application makes use of a fairly common (table based) security model in which privileges are assigned to roles, which are then assigned users. So, for example, the user "JSmith" may be assigned to a "SalesRep" role and as a result have "Add Customer", "View Customer", and "Edit Customer"...
2
3049
by: Jesper Stocholm | last post by:
I have implemented role-based security within my ASP.Net application. However, it seems the role is not passed to the authentication ticket I create. I want to use it to display/hide some content based on the user's role. I wrote this to do it: if (HttpContext.Current.User.Identity.IsAuthenticated) { plLoggedIn.Visible = true;
2
3159
by: bradgatewood | last post by:
I am in the process of developing a highly customizable application and I'm looking for a way to allow personalization by role. This is different than shared scope in the fact that I want to allow multiple clients to make modifications to properties, placement, controls on page, etc... and have all users see the customizations that apply to them. Customizations will take place at Client > Branch > Division levels. So when a user logs into...
7
3010
by: nugget | last post by:
Role-based security for an ASP/ASP.NET mixed environment Hello: My co-worker and I have been charged with designing role-based security for our intranet. The technologies we have to work with are ASP and ASP.NET. This security design must support *both* technologies. Currently, we have a successful collection of both ASP and ASP.NET applications with an identical look and feel; you'd only know they are different by virtue of an ASP...
1
1303
by: JohnC | last post by:
I'm in the concept stage of putting together a web application. Certain featues will be available only if the person has been given access. This is based on their particular subscription. I can create database tables that have an entry for each user and the features they have access to. The logic that decides whether the feature should be diplayed or not (reading values from tables) will be at the .NET class level. I want to make...
6
18672
by: Max2006 | last post by:
Hi, I need to hide a series of siteMapNodes to certain roles. That means roles have access to the siteMapNode, but the node doesn't appear on the navigation menu. I'll use Response.Redirect to jump to hidden pages. How can I do that? I tried securityTrimmingEnabled="true" in my web.config. But it doesn't help because the pages are accessible to the roles. I just want to hide the pages from the main menu when certain roles login
1
2041
by: VB Programmer | last post by:
Using ASP.NET 2.0 with Memberships. I have 2 folders, admin and client. Each folder has a sitemap file, admin.sitemap and client.sitemap, in the appropriate directory. I have a master page with a menu control. How can I load the correct sitemap file into the menu control based on the user's current role?
0
9684
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10236
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...
1
10182
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10017
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7552
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
5577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
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
3
2928
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.