473,434 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

dynamic contents/navigation frame

Hi,

I've developed an ASP.net application for an intranet site. Users will
be identified using Windows authentication and they will belong to one
of two roles, Admin or Users. The application uses frames with a
contents frame down the left which at the moment consists of html
tables with a href in each one which will show the appropriate page in
the main frame. Nothing too fancy.

Now, what I want to do is only show the appropriate table items in the
left frame depending on which role the user belongs to. For example if
they're in the Users role then show just a few table items but if they
belong to the Admin role then show all the items.

So my question is, what is the best way to do this? At the moment the
contents frame is just a static html page. For what I want to do, do I
need to make it an aspx page and use asp labels toggling their visible
property?

This is my first ASP.net project coming from a VB6/SQL Server
background so I'm learning along the way. Thanks for any help.

Regards,

Mong
Nov 18 '05 #1
2 1735
There are two methods of doing this.

1. Create Windows Group Admin and Users. Add the appropriate users to them.
In your code, Check for if the Logged In user (HttpContext->GetUser())
belongs to that role. Based on this display the appropriate menu items.
2. Create a Database table and store the Group/User/Items mapping in the
tables. Get the items for the logged in user ( using above said method) and
display the appropriate menu items.

This will work with Windows Authentication enabled in IIS and impersonation
is said to false.
If impersonation is true then use SecurityPrincipal.GetCurrent
--
Ganesan Subramanian
Database and Datawarehousing.
"Mong" <mo*********@yahoo.com.au> wrote in message
news:47**************************@posting.google.c om...
Hi,

I've developed an ASP.net application for an intranet site. Users will
be identified using Windows authentication and they will belong to one
of two roles, Admin or Users. The application uses frames with a
contents frame down the left which at the moment consists of html
tables with a href in each one which will show the appropriate page in
the main frame. Nothing too fancy.

Now, what I want to do is only show the appropriate table items in the
left frame depending on which role the user belongs to. For example if
they're in the Users role then show just a few table items but if they
belong to the Admin role then show all the items.

So my question is, what is the best way to do this? At the moment the
contents frame is just a static html page. For what I want to do, do I
need to make it an aspx page and use asp labels toggling their visible
property?

This is my first ASP.net project coming from a VB6/SQL Server
background so I'm learning along the way. Thanks for any help.

Regards,

Mong

Nov 18 '05 #2
Ditch the frames idea. Frames are a pain in ASP.NET.
Instead you should use user controls to divide logical sections of your
page.
Here's more info:
http://msdn.microsoft.com/library/de...ercontrols.asp
http://msdn.microsoft.com/library/de...ercontrols.asp
http://msdn.microsoft.com/library/de...ebControls.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Mong" <mo*********@yahoo.com.au> wrote in message
news:47**************************@posting.google.c om...
Hi,

I've developed an ASP.net application for an intranet site. Users will
be identified using Windows authentication and they will belong to one
of two roles, Admin or Users. The application uses frames with a
contents frame down the left which at the moment consists of html
tables with a href in each one which will show the appropriate page in
the main frame. Nothing too fancy.

Now, what I want to do is only show the appropriate table items in the
left frame depending on which role the user belongs to. For example if
they're in the Users role then show just a few table items but if they
belong to the Admin role then show all the items.

So my question is, what is the best way to do this? At the moment the
contents frame is just a static html page. For what I want to do, do I
need to make it an aspx page and use asp labels toggling their visible
property?

This is my first ASP.net project coming from a VB6/SQL Server
background so I'm learning along the way. Thanks for any help.

Regards,

Mong

Nov 18 '05 #3

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

Similar topics

6
by: hsomob1999 | last post by:
so i have a <ul> and I allow the user to append items to it. The problem is that on mozilla the <span class="line"> which is just a line to divide the sections gets overlaped and doesnt move down...
10
by: dkode8 | last post by:
I am ripping my hair out trying to set the src (location.href) of an IFRAME that i show once a user clicks on a certain link: function editTimeEntry(timeEntryID, dayID, e) { var x = e.clientX;...
2
by: Martin Schmid | last post by:
I've got a page w/ frames... one is a navigation frame with some ImageButtons. In the navigation frame, there is also a drop-down list. I need to redirect the mainFrame based on which ImageButton...
4
by: Pete | last post by:
Hello- I am have a real trying time finding information on this subject. I would like to create a web page that utilizes framesets (top & bottom) and a navigation control I created from a datalist...
1
by: tribal boy | last post by:
Guys, I am using a dynamic menu which uses xml,xsl a css file and javascript. This works fine when there are no server controls around or underneath it. The problem is whenever the menu...
6
by: DRS.Usenet | last post by:
When I run alert("page contents:" + content.document.documentElement.innerHTML); I am able to pull the content. I see something like this page contents:<head><title>A Title</title>...
0
by: nbancajas | last post by:
hello everyone, i need some help regarding my python code. it is a medical plotter/display program with wxagg backend. it reads 3 kinds of data from a text file: ecg, heart rate, and oxygen...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
1
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...
0
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...
0
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 project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.