Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Urgent Menu Querry

Urgent Menu Querry

Scheduled Pinned Locked Moved ASP.NET
helpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 2840174
    wrote on last edited by
    #1

    Hi I am new in develoment can please any one help. I have had menu id "Menu3" in Menu.ascx file and i have .aspx pages. Menu3 has 4 options and every option has its own sub options Here is main structure of Menu3 Report Data Operation Logout I have two categories of users Admins and non Admins. I don't want to show "Operation" to non-admins. I need to decide at login time.I had saved admin flag in Session (user is admin or not) but how can i disable "operation" if flag is false in .aspx page_load event. I already include Menu.ascx in aspx pages. I am using VS2008. thanks

    J D C 3 Replies Last reply
    0
    • U User 2840174

      Hi I am new in develoment can please any one help. I have had menu id "Menu3" in Menu.ascx file and i have .aspx pages. Menu3 has 4 options and every option has its own sub options Here is main structure of Menu3 Report Data Operation Logout I have two categories of users Admins and non Admins. I don't want to show "Operation" to non-admins. I need to decide at login time.I had saved admin flag in Session (user is admin or not) but how can i disable "operation" if flag is false in .aspx page_load event. I already include Menu.ascx in aspx pages. I am using VS2008. thanks

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      Im sorry, but your question is no more or less urgent than anyone else's. Its generally considered rude to expect your question to be answered "Urgently". As for your question, the answer really depends on how you identify Admins/Non-Admins in your application. For example, in my application I use the built-in ASP.NET role-based security, and so In a control, I could do something like

      if(!Page.User.IsInRole("Administrators"))
      {
      // hide the item that should only be visible to Administrators
      }

      1 Reply Last reply
      0
      • U User 2840174

        Hi I am new in develoment can please any one help. I have had menu id "Menu3" in Menu.ascx file and i have .aspx pages. Menu3 has 4 options and every option has its own sub options Here is main structure of Menu3 Report Data Operation Logout I have two categories of users Admins and non Admins. I don't want to show "Operation" to non-admins. I need to decide at login time.I had saved admin flag in Session (user is admin or not) but how can i disable "operation" if flag is false in .aspx page_load event. I already include Menu.ascx in aspx pages. I am using VS2008. thanks

        D Offline
        D Offline
        Dewayne Dodd
        wrote on last edited by
        #3

        I believe that something like this would help you: In the menu.ascs file's Load Event the following code would work to disable that menu item

        if (Session["IsAdmin"] == false)
        {
        this.Menu1.Items[2].Enabled = false;
        }

        This is the way that I came up with to accomplish this task. You could also generate the menu at runtime and if the user is an not an admin just don't create the Operation menu.

        1 Reply Last reply
        0
        • U User 2840174

          Hi I am new in develoment can please any one help. I have had menu id "Menu3" in Menu.ascx file and i have .aspx pages. Menu3 has 4 options and every option has its own sub options Here is main structure of Menu3 Report Data Operation Logout I have two categories of users Admins and non Admins. I don't want to show "Operation" to non-admins. I need to decide at login time.I had saved admin flag in Session (user is admin or not) but how can i disable "operation" if flag is false in .aspx page_load event. I already include Menu.ascx in aspx pages. I am using VS2008. thanks

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Member 2842468 wrote:

          I am new in develoment

          Someone who is 'new to development' should not be written commercial code and sure as hell should not be writing permissions systems. The people paying you a pittance are going to get exactly the system they deserve, but when reality sets in, you will be out of a job unless you do some work to build a basic skillset.

          Christian Graus Driven to the arms of OSX by Vista.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups