Page view counter

how can i add differant type of membership

Last post 08-20-2008 6:17 AM by SpiderMaster. 4 replies.

Sort Posts:

  • how can i add differant type of membership

    08-13-2008, 4:20 AM
    • Loading...
    • wael_e
    • Joined on 05-08-2007, 6:39 AM
    • Posts 51

    like level or category of membership

    like users in level / type : type1: can view ads only not post

    users in level / type : type2: can view ads and post

    like this are it can do it

    thanks alot for any help
    http://www.feckra.com/blog/
  • Re: how can i add differant type of membership

    08-13-2008, 10:59 AM
    • Loading...
    • darkknight187
    • Joined on 09-14-2006, 4:35 AM
    • Bothell, Washington
    • Posts 793

    I don't have any examples for you, but what you are talking about are roles.

    Do a Google search for "asp.net roles"
    I'm sure you will find a lot of tutorials.

    Or you could wing it, by default the kit has two roles setup, Admin, and guest.

    Once you figure out how to set a new role, look at your web.config
    It looks like access to certain areas are given depending on the role.

    One more thought, on your local computer, you can use the admin tool to manage users, and create roles.
    I'm betting when a new role is created, it just adds it to the web,config.
    You could use the admin tool in Visual Web Developer to create a new role, and then compare the differences in the web.config.

    Good Luck

    Please remember to click “Mark as Answer” on the post that helps you.
    This can be beneficial to other community members reading the thread.
  • Re: how can i add differant type of membership

    08-13-2008, 11:14 AM

    Role management is defined in your database typically ASPNETDB.mdf how ever if you have not researched the way the database works I would suggest staying away from it for now.

    Like the previous post, Your best bet is to use the administration tool from your solution explorer.

    You will find a link called "Security" and now you can manage all users and roles.

    If you want to do a category like search on your site that is defined by roles you would simply have a piece of code like

    if (User.IsAuthenticated)

    {

           if(User.IsInRole == "NameOfRole")

           {

                   /// Add your code here

            }

    }

    Good Luck







    Regards, Regan


  • Re: how can i add differant type of membership

    08-14-2008, 2:01 AM
    • Loading...
    • wael_e
    • Joined on 05-08-2007, 6:39 AM
    • Posts 51

    thanks to all

    yes i know it is role but where i will add this condion and mange the roll in this webapplication i know how i will add security role or mange it but how i will use it in this classifed applications

    thanks alot for any help
    http://www.feckra.com/blog/
  • Re: how can i add differant type of membership

    08-20-2008, 6:17 AM

    You would use my example in the page_load of each page you want to modify or you can add it for specific pages in your We.Config file.

    If you had a clearer example of what you want to achieve perhaps I could help you further.







    Regards, Regan


Page 1 of 1 (5 items)
Microsoft Communities