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. General Programming
  3. .NET (Core and Framework)
  4. Urgent Menu Querry

Urgent Menu Querry

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpquestion
3 Posts 3 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

    P L 2 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

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Take a look at using the Membership and Role providers with .NET. Set up a sitemap to control the menu that appears, and attach the Admin role to the ones you want only the Admin users to see. This[^] should help. By the way, please ask questions about ASP.NET in the ASP.NET forum in future.

      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

      My blog | My articles | MoXAML PowerToys

      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

        L Offline
        L Offline
        Leonardo Muzzi
        wrote on last edited by
        #3

        You can do it inside the Page_Load event in Menu.ascx webcontrol. Just check the Session and disable the option.

        Regards, Leonardo Muzzi

        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