473,598 Members | 3,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1743
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 SecurityPrincip al.GetCurrent
--
Ganesan Subramanian
Database and Datawarehousing .
"Mong" <mo*********@ya hoo.com.au> wrote in message
news:47******** *************** ***@posting.goo gle.com...
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*********@ya hoo.com.au> wrote in message
news:47******** *************** ***@posting.goo gle.com...
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
2826
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 and adjust to the newly added items like it does in iE. It just occured to me that i dont really have to use a span, and a html <hr> tag could do the trick -I will go try. But aside from that could some one explain why this occurs? And will I get...
10
15344
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; var y = e.clientY; ew = frames; eF = getObj('editPopID'); eF.style.left = x + 10; eF.style.top = y + 10;
2
1081
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 is selected, and which value is selected in the drop-down list. I.e., each ImageButton is a thumbnail image, and the dropdown lets the viewer select the result size of the image... 25%, 50%, 100%. I need to dynamically generate something that...
4
1764
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 that gets data from a sql datasource (sort of like a tabstrip). I'm getting pretty comforatable on the asp.net side of things, but I'm lacking in the javascript department. I understand that I need to add javascript to make the frames work...
1
4279
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 encounters a server control, it closes itself.
6
10985
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> <FRAMESET ROWS="75,*">
0
2209
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 saturation. ecg data is plotted by embedding matplotlib inside wx, while the other two is wxStaticText. to differentiate them, a buffer character was introduced before each reading and parsed accordingly. my PROBLEM is i want to make the program work...
0
7902
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
8395
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
8398
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
8050
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
8265
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...
0
6719
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, and deployment—without 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...
0
3898
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3939
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1250
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.