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. dynamically Enabling or disabling some item in menu

dynamically Enabling or disabling some item in menu

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netvisual-studiotutorial
5 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.
  • M Offline
    M Offline
    mohd imran abdul aziz
    wrote on last edited by
    #1

    Dear All, I am quite new to dotnet. Currently developing web application using asp.net and C#(Visual studio 2005).i WANT TO khow whether it is possible possible to disable some of the item for some user. Please guide me

    regards imran khan

    A M E 3 Replies Last reply
    0
    • M mohd imran abdul aziz

      Dear All, I am quite new to dotnet. Currently developing web application using asp.net and C#(Visual studio 2005).i WANT TO khow whether it is possible possible to disable some of the item for some user. Please guide me

      regards imran khan

      A Offline
      A Offline
      abulhassan_shock
      wrote on last edited by
      #2

      items means, what ? Do you mean control ? If that was your question, Just check the UserId in the session and make the visibility property to false.

      Hope, am clear.

      1 Reply Last reply
      0
      • M mohd imran abdul aziz

        Dear All, I am quite new to dotnet. Currently developing web application using asp.net and C#(Visual studio 2005).i WANT TO khow whether it is possible possible to disable some of the item for some user. Please guide me

        regards imran khan

        M Offline
        M Offline
        Manickarj
        wrote on last edited by
        #3

        The above menu i give the value for parent and child menu I disable the New loan preference submenu for (int i = 0; i < Menu1.Items.Count; i++) { if (Menu1.Items[i].Value == "11")//Menu { for (int j = 0; j < Menu1.Items[i].ChildItems.Count; j++)//Submenu { if (Menu1.Items[i].ChildItems[j].Value == "1") { Menu1.Items[i].ChildItems[j].Enabled = false; return; } } } } sorry for my english

        M 1 Reply Last reply
        0
        • M mohd imran abdul aziz

          Dear All, I am quite new to dotnet. Currently developing web application using asp.net and C#(Visual studio 2005).i WANT TO khow whether it is possible possible to disable some of the item for some user. Please guide me

          regards imran khan

          E Offline
          E Offline
          ednrgc
          wrote on last edited by
          #4

          Yes, there are many ways to do this.

          1 Reply Last reply
          0
          • M Manickarj

            The above menu i give the value for parent and child menu I disable the New loan preference submenu for (int i = 0; i < Menu1.Items.Count; i++) { if (Menu1.Items[i].Value == "11")//Menu { for (int j = 0; j < Menu1.Items[i].ChildItems.Count; j++)//Submenu { if (Menu1.Items[i].ChildItems[j].Value == "1") { Menu1.Items[i].ChildItems[j].Enabled = false; return; } } } } sorry for my english

            M Offline
            M Offline
            mohd imran abdul aziz
            wrote on last edited by
            #5

            Thanks A lot.it worked. thanks once again

            regards imran khan

            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