none
Implement a Custom Membership User RRS feed

  • Question

  • My assignment is to create a website using asp.net and has 3 pages.
    A login page, a page that will display all the users (username, first name, lastname, group) in a gird and a page that will display all the groups and the users belonging to those groups.

    I’ve created the login page using the Membership system.
    Now the users page should display user’s last and first name as well as their usernames but the Membership system only saves username/password into the db (and some other stuff that I don’t need) so what I did is implemented a custom Membership User by extending the MembershipUser class as show here:
    http://msdn.microsoft.com/en-us/library/ms366730.aspx
    and added those 2 extra fields I needed (last and frist name).

    Now the question is how do I enter data into those fields? The user creation wizard (from the ASP.NET Configuration page) for the Membership system only allows me to enter specific info like username/pasword email and etc but how do I populate my custom fields?

    Since in this particular assignment I don’t need a user creation page I was thinking to manually populate the DB (without using the ASP.NET Configuration wizard) with some arbitrary users and use the extended MembershipUser class to fetch that data for login validation and for populating the grid.

    So I guess my questions are, how do I manually populate my DB with users and will I still be able to use the Membership system to validate the login and fetch user data for the grid?
    And am I going the right way about solving the assignment at all? Or is implementing a custom membership user an overkill for this? Is there a simpler or better way to solve it?

    Really frustrated about this and it’s due for today and I’d really appreciate any leads!

    Thursday, July 14, 2011 10:31 AM