|
Subject:
|
insert new value through user wizard tool
|
|
Posted By:
|
momo
|
Post Date:
|
4/18/2006 4:53:39 PM
|
hello, i have a problem with the create user wizard i added a new column named serial to the aspnet_users table which is in the aspnetdb the default db that ships with visual studio, i have a register page that has the create user wizard and i added a step to the wizard to add the serial for the user which is a number like 1100,2200,3400....etc now i dont know how to add that serial to the new user? hope u can help me.thanks
|
|
Reply By:
|
Imar
|
Reply Date:
|
4/19/2006 1:26:19 PM
|
Hi there,
First of all, just extending the aspnet_Users table might not be a good idea. You might run into troubles with future upgrades to the .NET Framework.
That said, there are a couple of ways to do what you want.
1) Create a class that inherits from MembershipUser and implement the Serial property. Probably a lot of work, and it might also mean you need to do some casting in the code that access the MembershipUser.
2) Store additional info in the Profile for each user. Scott Guthrie has written a nice article about that: http://weblogs.asp.net/scottgu/archive/2005/10/18/427754.aspx
HtH,
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me. Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
|
|
Reply By:
|
momo
|
Reply Date:
|
4/19/2006 2:50:24 PM
|
hello Imar, thanks for the reply and the link i already read the link but the problem is i just want to store that serial for the new user to use to show data for that user if it's not a good idea to add a column to the aspnet_users table so how i can assign the serial for each user can i store it in profile or something just need it to view some data belongs to the user, and as for the class i'm kind a beginner so i cant code that class if u have one or any site has that class just put it here and i would be thankful, waiting for ur reply .thanks
|
|
Reply By:
|
Imar
|
Reply Date:
|
4/19/2006 3:01:01 PM
|
quote: how i can assign the serial for each user can i store it in profile or something
Exactly; that's what the article is all about. Just store the additional data in the Profile object and access it from there.
Pretty easy to make, especially with the tutorial, so you may want to reread it and see if it fits your needs.
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me. Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
|