Reputation: 3515
I have created an ASPNETDB database on SQL Server 2008 for users, roles and profiles with Aspnet_regsql.exe.
But what I want to more user attributes apart from those default ones (name, email, mobile and comment), e.g. Postcode, Address, Telephone number, Rank, Position, etc. And also those new fields should be exposed to CreateNewUserWizard in the aspx page design mode, so that new user can be registered with more attributes.
I tried to add new columns in the "aspnet_Membership" table of ASPNETDB database. But they weren't automatically picked up.
Can anyone please give me some help on this? Thanks
Cheers, Alex
Upvotes: 1
Views: 2860
Reputation: 3065
Please refer aspnet_Profile table
To add additional attributes columns you will need to create Profile Properties in web.config file and access this Properties and update the Profile of the currently created user.
If you have complex information about users then u can create your table and use the foreign key relation ship to UserId in aspnet_users table.
Check this MSDN ARTICLE
HOW TO ADD PROPERTIES for Profile
Complete details of using Profiles in Asp.net C# is explained in one of the answer on StackOverflow itself please refer how-to-assign-profile-values
Upvotes: 2
Reputation: 15253
Don't touch the database yourself. Follow the steps outlined here:
http://weblogs.asp.net/scottgu/archive/2005/10/18/427754.aspx
Note that you need to use the "Website" project template. Profiles are not supported out-of-the-box (without some customization) for the Web Application project template.
Upvotes: 3