Nannette Thacker ShiningStar.net

ASP.net Web Application Development

Sponsors

News

See all Blog Posts by Nannette.

Nannette Thacker, consultant and owner of Shining Star Services LLC, specializes in development of custom dynamic database driven web applications utilizing ASP.net technologies. Nannette has been developing ASP sites since 1997. Nannette has written numerous articles on web development techniques and tutorials.

Nannette is the owner and developer of ChristianSinglesDating.com.

 Subscribe in a reader





View Nannette  Thacker's profile on LinkedIn

Loading a Menu Programmatically based on Roles - Creating a Custom Membership Provider and Membership User utilizing a Data Set Table Adapter - Step 17

As we continue our series, we'll look at programmatically loading a menu control.

In this example, we define our menu in the code in front, but do not add any items. All items are added in our codebehind, based on the logged in user's role.

 Dim mi As New MenuItem
            Dim currentmenucount As Integer = menu1.Items.Count

            mi = New MenuItem
            mi.NavigateUrl = "~/default.aspx"
            mi.Text = "Home"
            menu1.Items.AddAt(menu1.Items.Count, mi)

Read the entire article here...

 

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required)