views:

41

answers:

4

If I am using asp.net's built-in membership provider, then how can I store arbitrary user-info while using CreateUserWizard control?

Suppose I have three types of users in my application: Student, Teacher and Staff. I want to store a flag for every user to distinguish their types while creating a user through CreateUserWizard - control.

How to do that?

+1  A: 

Short answer: use Profile.

Wintorez
A: 

You should probably have a look at this long series on the Asp.Net Membership, Roles, and Profiles. It should have more then enough information to get you what you are trying to do.

Part 6 specifically covers the Profile portion.

http://aspnet.4guysfromrolla.com/articles/120705-1.aspx

TehOne
+1  A: 

Use a user profile to store user information. It looks as though you are creating a role based on the person logging in in this case. If this is true perhaps using / setting a role is the better approach on this.

klabranche
A: 

I agree with @klabranche, using roles is the perfect solution for "types of users" (Student, Teacher and Staff).

I haven't done it with CreateUserWizard, but it should be pretty straightforward: How to Add Users to Roles Using the CreateUserWizard.

Edo