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 8716181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:01:06+00:00 2026-06-13T06:01:06+00:00

I have the css layout: One column fixed width layout, from maxdesign.com I have

  • 0

I have the css layout: One column fixed width layout, from maxdesign.com

I have two menu items defined like the following:

<div id="navigation">
        <ul>
            <li><a href="#">Data Entry</a></li>
            <li><a href="#">Reports</a></li>
        </ul>
    </div>

Now, let’s say that I have two roles: guest and operator, and I want that for example if a user with role guest is logged in, then just the Report item from the menu appear, and in case of a user operator is logged in, then both options appear.

How can I accomplish that?

EDIT:

Based on your responses, I’ll go with the server side logic to deal with this:

<div id="navigation">
        <ul>
            <li><asp:LinkButton ID="lkbDataEntry" runat="server">Data Entry</asp:LinkButton></li>
            <li><asp:LinkButton ID="lkbReports" runat="server">Reports</asp:LinkButton></li>                
        </ul>
    </div>

Thanks!

  • 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-06-13T06:01:07+00:00Added an answer on June 13, 2026 at 6:01 am

    You can put this in the Page_Load..

        Dim cs As ClientScriptManager = Page.ClientScript
    
        If Not cs.IsClientScriptBlockRegistered(Me.GetType(), "RoleVariable") Then
            Dim js As New String
            js = "var _role = " & role & ";"
            cs.RegisterStartupScript(Me.GetType(), "RoleVariable", js, True)
        End If
    

    And from there, you will have the role in the Javascript realm, where you can manipulate the visibility of the items you want.

    So…

    <script type="text/javascript">
        function hideStuff() {
            if (_role === "operator") {
                // hide/show your elements here
            }
            else if (_role === "guest") {
                // hide/show your elements here
            }
        }
    </script>
    

    Keep in mind that this approach is all client-side and is therefore easy for another developer to manipulate if they really wanted to. But on the other hand, it’s the simplest. Don’t use this approach for high-security situations.

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

Sidebar

Related Questions

I have the css layout: One column fixed width layout, from maxdesign.com the following
Let's say I have a simple CSS layout and my menu is a column
I have seen several methods for creating simple fixed width single column layout using
I have a fluid width layout. Left and right column have a fixed width
I have a MasterPage that is two column layout, left column menu, right column
I have a table based layout, with one main two-column table, for left and
I have achieved nice a two column layout form with the help of CSS
I have a quite complicated HTML/CSS layout which I would like to convert to
I like the layout that Facebook Timeline has with the staggered two column posts.
I have simple page using a two-column page layout that breaks on zooming. Here

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.