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. Master Page in ASP.Net

Master Page in ASP.Net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorialquestion
7 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.
  • S Offline
    S Offline
    Sun Rays
    wrote on last edited by
    #1

    Hi, I am having two users like Admin and User.Now i dont want to Show admin Part to User.For that I have created Two Master Pages,one for Admin and another for User. And in Mater pages I have created menu containing different contents for Admin and User. Admin can view all things but User can't view admin Part. So how to do this ? Any other way ? Thanks.

    D T 2 Replies Last reply
    0
    • S Sun Rays

      Hi, I am having two users like Admin and User.Now i dont want to Show admin Part to User.For that I have created Two Master Pages,one for Admin and another for User. And in Mater pages I have created menu containing different contents for Admin and User. Admin can view all things but User can't view admin Part. So how to do this ? Any other way ? Thanks.

      D Offline
      D Offline
      dj rock
      wrote on last edited by
      #2

      hi You can have one master page. and after login you can change your menu according to user's access privileges. You dont need to have two master pages for that. Hope it helps ;););)

      Regards, DJ Rock

      S 1 Reply Last reply
      0
      • S Sun Rays

        Hi, I am having two users like Admin and User.Now i dont want to Show admin Part to User.For that I have created Two Master Pages,one for Admin and another for User. And in Mater pages I have created menu containing different contents for Admin and User. Admin can view all things but User can't view admin Part. So how to do this ? Any other way ? Thanks.

        T Offline
        T Offline
        tmiku
        wrote on last edited by
        #3

        As u have designed the page for different user then u might be checking the user or password or something like that. check their if the user is "Admin" then view all the content, if the user is "User" then view the content as per

        S 1 Reply Last reply
        0
        • D dj rock

          hi You can have one master page. and after login you can change your menu according to user's access privileges. You dont need to have two master pages for that. Hope it helps ;););)

          Regards, DJ Rock

          S Offline
          S Offline
          Sun Rays
          wrote on last edited by
          #4

          But i dont know how to change my .ascx user control which i have make that s treeview.

          1 Reply Last reply
          0
          • T tmiku

            As u have designed the page for different user then u might be checking the user or password or something like that. check their if the user is "Admin" then view all the content, if the user is "User" then view the content as per

            S Offline
            S Offline
            Sun Rays
            wrote on last edited by
            #5

            Ya i am checking it via role.. but as i have said that i am using .ascx user control in which i have made treeview. and registered that user control in every web page now how can display different .ascx control to every page ?

            G 1 Reply Last reply
            0
            • S Sun Rays

              Ya i am checking it via role.. but as i have said that i am using .ascx user control in which i have made treeview. and registered that user control in every web page now how can display different .ascx control to every page ?

              G Offline
              G Offline
              greekius
              wrote on last edited by
              #6

              in User Control, define a property like "_IsAdmin". if he is admin, add the Admin items or not in to menucontrol or treeview control. Or create two menu user control, add both to the page , setting theirs visibility to False. After loging, show whis is necessery :D

              S 1 Reply Last reply
              0
              • G greekius

                in User Control, define a property like "_IsAdmin". if he is admin, add the Admin items or not in to menucontrol or treeview control. Or create two menu user control, add both to the page , setting theirs visibility to False. After loging, show whis is necessery :D

                S Offline
                S Offline
                Sun Rays
                wrote on last edited by
                #7

                Hi, Thanks it's working as i was want..... :)

                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