Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6190843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:39:38+00:00 2026-05-24T02:39:38+00:00

This question is pretty difficult for me to phrase well, so please bear with

  • 0

This question is pretty difficult for me to phrase well, so please bear with me.

In VS Express I’m creating a series of web pages. On each page I want there to be a series of functions, relevant to a given user role. I want all my html code on a single aspx page, but with only certain sections appearing (hopefully asynchronously) as determined by the url which will be linked to via a drop down menu in the navbar.

I would like to use Rerouting (I think it’s called) to keep my urls nice and more malleable so I can change them later without breaking bookmarks and such.

As a user, in a given role, I would mouse over the drop-down menu and see only the functions which I am allowed to perform. Upon clicking on one, it would update the url something like domain.com/form1 and would only show the block of code (in the aspx page, and again, preferably asynchronously) relevant to that action.

I’m thinking to use divs and the css “display:none;” property. I’m not not sure by what mechanism to toggle between the “views,” if you will, of the various functions. Should I use Javascript of ASP.NET?

I’m so sorry for such a convoluted question. I spent over 20 minutes and this is the best way I could figure to ask. Does this even many any sense? If so, am I going about this all wrong or am I on the right track? I appreciate any stabs at this.

Cheers 😉

PLEASE READ: I originally wanted to accomplish this with the urls, but I found that using the “MultiView” ASP.NET control is was a much better solution to my dilemma. I just wanted to clear up any presumed discrepancy between my original question and my answer. Like I said, it was a difficult question to figure out how to ask at the time. 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:39:38+00:00Added an answer on May 24, 2026 at 2:39 am

    Being somewhat new to .NET and especially ASP.NET, I’m learning new things everyday, literally. I’ve recently discovered the “Multiview” control, which is amazing. I’ve used it for creating multiple menu bars (I know this seems wierd, but it’s to simulate different user “modes” or user groups, etc), as well as the combining of content onto a single page as I mentioned in my original question. I then added a secondary control for toggling between the menus. Here is some sample code for how I implemented the control for my multi-menubar 😛

    <asp:MultiView ID="MenuView" runat="server">
        <!-- ADMIN GROUP -->
        <asp:View ID="View0" runat="server">
            <asp:Menu ID="adminNav" runat="server" CssClass="menu" IncludeStyleBlock="False" Orientation="Horizontal"><DynamicMenuItemStyle />
                <Items>
                    <asp:MenuItem NavigateUrl="~/Reports.aspx" Text="View Reports" />
                    <asp:MenuItem NavigateUrl="~/Approve.aspx" Text="Compliment hard-working employees" />
                    <asp:MenuItem NavigateUrl="~/Promote.aspx" Text="Promote the qualified employees :)" />
                    <asp:MenuItem NavigateUrl="~/Fire.aspx" Text="Send underlings home to starving children" />
                </Items>
            </asp:Menu>
        </asp:View>
        <asp:View ID="View1" runat="server">
        <!-- USERS -->
            <asp:Menu ID="userNav" runat="server" CssClass="menu" IncludeStyleBlock="False" 
                Orientation="Horizontal"><DynamicMenuItemStyle />
                <Items>
                    <asp:MenuItem NavigateUrl="~/Work.aspx" Text="Look productive" />
                    <asp:MenuItem NavigateUrl="~/Complain.aspx" Text="Complain about boss" />
                    <asp:MenuItem NavigateUrl="~/Praise.aspx" Text="Show appreciation for your awesome boss" />
                </Items>
            </asp:Menu>
        </asp:View>
    </asp:MultiView>
    <!-- MODE MENU -->
    <asp:DropDownList ID="modeMenu" runat="server" AutoPostBack="True" 
        ViewStateMode="Inherit" CssClass="modeMenu" EnableViewState="True">
        <asp:ListItem>Admin</asp:ListItem>
        <asp:ListItem>User</asp:ListItem>
    </asp:DropDownList>
    

    Code Behind for controlling “MenuView” with “modeMenu” dropdown which I have as “position:fixed; left:5px; top:5px;” in my CSS to keep it out of the way.

    Protected Sub mode(ByVal sender As Object, ByVal e As System.EventArgs) Handles modeMenu.Load, modeMenu.SelectedIndexChanged
        Session.Add("mode", modeMenu.SelectedValue) //I use a session variable to maintain the state of the menu.
        Select Case (modeMenu.SelectedValue)
            Case "Admin"
                MenuView.ActiveViewIndex = 0
            Case "User"
                MenuView.ActiveViewIndex = 1
        End Select
    End Sub
    

    There you have it. I hope someone else finds this useful. Cheers 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Pretty sure this question counts as blasphemy to most web 2.0 proponents, but I
Well, first of all sorry about this question it must be pretty straight forward
This is going to be a pretty long question, so bear with me. I'm
This question is pretty much the same as this .Net question exept for java.
Pretty much the same as this question. But I can't seem to get this
First off, let me preface this question by stating that I'm really a pretty
I think the question is pretty self explanatory. Anyone done this before? UPDATE :
this is a pretty basic question but I can't seem to get it right.
This is a pretty simple question but I'm somewhat stumped. I am capturing sections
This is a pretty basic question but I can't find a good answer for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.