Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 4th, 2005, 05:53 PM
Authorized User
 
Join Date: Jul 2005
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default Set the # of control?

The number of control is a variable depending on the user priviledge.

Is that possible to set via Page_Load()?

I have a menu with 5 items. Some people have 3 or 4 or 5. Each menu
has sub menu. The number of sub menu items is also depending on the user login.


 
Old November 4th, 2005, 06:05 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

This pretty much depends on your implementation and your wishes.

Probably the easiest thing to do is wrap your controls into a LoginView control. Inside that control, define a RoleGroups element with a couple of RoleGroup element, each holding the controls for that group. E.g.:
Code:
<asp:LoginView ID="LoginView1" runat="server">
  <RoleGroups>
    <asp:RoleGroup Roles="SomeRole">
    </asp:RoleGroup>
  </RoleGroups>
</asp:LoginView>
There are other ways too, so if this doesn't help, can you provide more details?

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: The Child in Me by Clan of Xymox (Track 4 from the album: Hidden Faces) What's This?
 
Old November 4th, 2005, 10:12 PM
Authorized User
 
Join Date: Jul 2005
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you, Imar. I'm glad you point out. as a matter of fact, what is the common strategy for the security stufff?

 
Old November 4th, 2005, 10:23 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

That's a pretty broad question to answer over a forum post.

Are there any specific areas you have questions about?

Otherwise, take a look here: http://beta.asp.net/QuickStartv20/aspnet/default.aspx (currently down) and look under "Securing Your Application" and "Login Controls".

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Blume by Einstürzende Neubauten (Track 3 from the album: Tabula Rasa) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Set the Selection in Dropdownlist Control akhilhp ASP.NET 2.0 Basics 3 May 27th, 2007 07:13 AM
Set focus on web control vivekshah ASP.NET 1.0 and 1.1 Professional 1 June 18th, 2006 11:55 PM
how to set default value to datetimepicker control xshelp General .NET 1 December 8th, 2005 10:09 PM
How do I simulate a circular tab control set? elisabeth Javascript How-To 1 May 24th, 2004 08:14 AM
Set Custom Control Properites in Code-Behind DolphinBay ASP.NET 1.0 and 1.1 Basics 1 April 3rd, 2004 08:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.