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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How i control in some contents in the page

How i control in some contents in the page

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netcomhelptutorial
6 Posts 2 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.
  • A Offline
    A Offline
    Ahmed R El Bohoty
    wrote on last edited by
    #1

    Hi , i make administration web page to my site where i make permissions to all users but in the page level i want to control in some contents in the page , for example the edit button appear to admin but not appear in normal user . i know the general idea but i can not do it: ============================== Then you can identify as part of the Page_Load event on any page whether a user has logged in or not, and what their roles are (administrator, guest etc). If their role is administrator and you have your 'edit' button as an asp.net control you can make it visible in the Page_Load event. All the best,

    I hope to serve my religion (Islam) as much as possible and exert the effort in order to be a good model desire to achieve renaissance to our country. This mean that I would be one of the Geniuses in practical if Allah wishes. I think my Ambition will help me to do that. -------------------------------- Discover Other .... http://www.islamHouse.com

    C 1 Reply Last reply
    0
    • A Ahmed R El Bohoty

      Hi , i make administration web page to my site where i make permissions to all users but in the page level i want to control in some contents in the page , for example the edit button appear to admin but not appear in normal user . i know the general idea but i can not do it: ============================== Then you can identify as part of the Page_Load event on any page whether a user has logged in or not, and what their roles are (administrator, guest etc). If their role is administrator and you have your 'edit' button as an asp.net control you can make it visible in the Page_Load event. All the best,

      I hope to serve my religion (Islam) as much as possible and exert the effort in order to be a good model desire to achieve renaissance to our country. This mean that I would be one of the Geniuses in practical if Allah wishes. I think my Ambition will help me to do that. -------------------------------- Discover Other .... http://www.islamHouse.com

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

      How do you track users at all ? You should do it with some sort of session variables, then you can check that where-ever you are. However, I'd write a class that checks the session and just returns the admin settings. Either as part of a base page, or in a class that the base page contains.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      A 1 Reply Last reply
      0
      • C Christian Graus

        How do you track users at all ? You should do it with some sort of session variables, then you can check that where-ever you are. However, I'd write a class that checks the session and just returns the admin settings. Either as part of a base page, or in a class that the base page contains.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        A Offline
        A Offline
        Ahmed R El Bohoty
        wrote on last edited by
        #3

        Can i find any article that talk about this ?

        I hope to serve my religion (Islam) as much as possible and exert the effort in order to be a good model desire to achieve renaissance to our country. This mean that I would be one of the Geniuses in practical if Allah wishes. I think my Ambition will help me to do that. -------------------------------- Discover Other .... http://www.islamHouse.com

        C 1 Reply Last reply
        0
        • A Ahmed R El Bohoty

          Can i find any article that talk about this ?

          I hope to serve my religion (Islam) as much as possible and exert the effort in order to be a good model desire to achieve renaissance to our country. This mean that I would be one of the Geniuses in practical if Allah wishes. I think my Ambition will help me to do that. -------------------------------- Discover Other .... http://www.islamHouse.com

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

          I'm sure you can, but I don't know any off hand. The core question is - how are you tracking who is logged in, and what their permissions are ? Do you store it all in the session, or, do you store an id in the session and use that id to read permissions from the DB ? Either way, you need to write some code that gives you access to that information in the code that decides what gets rendered on your page.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          A 1 Reply Last reply
          0
          • C Christian Graus

            I'm sure you can, but I don't know any off hand. The core question is - how are you tracking who is logged in, and what their permissions are ? Do you store it all in the session, or, do you store an id in the session and use that id to read permissions from the DB ? Either way, you need to write some code that gives you access to that information in the code that decides what gets rendered on your page.

            Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

            A Offline
            A Offline
            Ahmed R El Bohoty
            wrote on last edited by
            #5

            i am depend on the membership provider that are ready in 2005

            I hope to serve my religion (Islam) as much as possible and exert the effort in order to be a good model desire to achieve renaissance to our country. This mean that I would be one of the Geniuses in practical if Allah wishes. I think my Ambition will help me to do that. -------------------------------- Discover Other .... http://www.islamHouse.com

            C 1 Reply Last reply
            0
            • A Ahmed R El Bohoty

              i am depend on the membership provider that are ready in 2005

              I hope to serve my religion (Islam) as much as possible and exert the effort in order to be a good model desire to achieve renaissance to our country. This mean that I would be one of the Geniuses in practical if Allah wishes. I think my Ambition will help me to do that. -------------------------------- Discover Other .... http://www.islamHouse.com

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

              OK - then you need to work out how that works, or what it gives you to work out membership and see how you can integrate that so you can access it across your site.

              Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

              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