views:

351

answers:

2

I want to store additional information on my users (address, phone).

Should I extend the registration page on the sample mvc template or should I set up a separate "profile" table and have that be a separate page?

It seems nice to do it on the registration page, but I am not sure if there are issues playing around with the "aspnet_"... tables that are setup for registration.

Any suggestions? I would like to use LINQ to SQL as well if possible but I see the default implementation is using

System.Web.Security.membership

+1  A: 

In terms of usability, you always want your registration to be as short as possible. It's a good habit to get into, even if the application that you are currently developing is not a commercial application. So the best way to design the front end would be to have as little information required from the visitor for registration and then have a separate "profile" page once they are logged in after registration is successful.

In terms of database design, keeping the profile in a separate table is once again recommended.

Once you've done this, you can either treat the profile information as just another set of information that the user can edit OR you can implement ProfileProvider. All you need to do is implement GetPropertyValues and SetPropertyValues.

public class MyProfileProvider : ProfileProvider
{
    public override SettingsPropertyValueCollection GetPropertyValues(SettingsContext context, SettingsPropertyCollection collection)
    {
    }

    public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection collection)
    {
    }
}
Praveen Angyan
+2  A: 

You could also consider creating custom Membership Provider.

Alexander Prokofyev
I see this suggested a lot but I'm still yet to see a *simple* example which actually works.
FerretallicA
I agree completely with FerretallicA here. People always claim "oh well, M$ thought of that already, just make your own MembershipProvider subclass"... Interesting then that examples of working solutions are hard to find.
Deniz Dogan