If they decide to make changes, you adapt to those changes and make them at that time. I'm sure if they make a change there will be a way to "upgrade".
I just mentioned the easiest way to "extend" the profile.
But in any case like you said you will just have to create your own table and store all your profile information in that table. Same logic as how it is currently being done, just more code.
I think the members table is just to create the ID which links to the Ads table
What type of queries are you trying to run on the aspnet_profile table. Are you trying to select all members with the PropertyName State for a specific state or something on that order?
This seems to be what you are trying to accomplish. I haven't really looked at it as I just found it but it seems rather easy to integrate with your current application in terms of modifications to the classifieds app itself
Justin.....I am attempting to do the same thing. You are a life saver....I need your patience though. Please give me the above directions step by step if you don't mind....I am not a advanced user. I would love to implement exactly what you suggested above
but I need step by step instructions. Man I would really appreciate it.
Thanks!!!!
Peter LeBlanc
A Birdzee Creator
www.birdzee.com or www.housecalltech.com
Mobile: (209)518-4623
peter@birdzee.com
You want to use the aspnet_profile table or you want to create your own custom profile as in the link I provided.
I haven't actually tried the method in the link yet, but I have just added PropertyNames and Values into the aspnet_profile table.
If you want to go that route I can help you out but the other method that was in the link I provided I haven't done yet. It does seem easy to implement though. Basically it looks like they provide you with a sql script, then you just put in your database
name and run it. I'd imagine the script creates a profile table and either creates new stored procs or alters the current stored procs so you will also need to know what fileds you are going to want and add those into the sql scripts. Then, modify your web.config
and your connection strings if you need to.
Let me know which method you are planning on using or if you have any questions. If I can't answer I'm sure someone else can
Thanks Justin. I am opting for the method described in the link. It is more portable and is independent of whatever MS decides to do in the future. I can simply plug in my profile stuff and keep going. I will keep you posted.
Have you by any chance run across a documentation for this application? I will be helpful if MS developers that put out these Starter kits included some documentation.
They did so in the kits that came with Framework 1.xxx like ISpy etc.
Ultimately I am looking to add a address fields that includes city, state and zip on the Post Ad page. I want my users to be able to search what category is close to them.
Can some give me some dummy instuctions....step by step how to configure and setup
Peter LeBlanc
A Birdzee Creator
www.birdzee.com or www.housecalltech.com
Mobile: (209)518-4623
peter@birdzee.com
yousaid
Participant
811 Points
334 Posts
Extending the user Registeration
Jul 22, 2006 11:43 PM|LINK
I have started extending the user registeration module to include more stuff like state, country, etc etc.
But without any documentation, I am wondering which DB table should I add these properties to?
I noticed there is a table called "members", but the two existing user properties in the profile are serialized in the profile table.
So my question is, Should I add these fields to the members table and if not, which table then?
If nyone has already done this, can you give guidance?
Any guidance from MS team will help.
Thanks
yousaid
justin0501
Member
705 Points
138 Posts
Re: Extending the user Registeration
Jul 23, 2006 02:55 PM|LINK
It will be easier to put your data in the aspnet_profile table in the ASPNETDB.
In your webconfig add an entry for whichever fields you wish to save. For example:
<profile enabled="true">
<properties>
<add name="FirstName" type="System.String"/>
<add name="LastName" type="System.String"/>
<add name="Address" type="System.String"/>
<add name="City" type="System.String"/>
<add name="State" type="System.String"/>
<add name="ZipCode" type="System.String"/>
<add name="MemberId" defaultValue="0" type="System.Int32"/>
<group name="Core"/>
</properties>
</profile>
Then in Register.aspx.vb you need to save those fields. So in the example above it would look like:
userProfile.MemberId = MembersDB.CreateMember(username, Membership.ApplicationName)
userProfile.FirstName = CType(Util.FindControlRecursively("FirstName", CreateUserWizardControl.Controls), TextBox).Text
userProfile.LastName = CType(Util.FindControlRecursively("LastName", CreateUserWizardControl.Controls), TextBox).Text
userProfile.Address = CType(Util.FindControlRecursively("Address", CreateUserWizardControl.Controls), TextBox).Text
userProfile.City = CType(Util.FindControlRecursively("City", CreateUserWizardControl.Controls), TextBox).Text
userProfile.State = CType(Util.FindControlRecursively("State", CreateUserWizardControl.Controls), TextBox).Text
userProfile.ZipCode = CType(Util.FindControlRecursively("ZipCode", CreateUserWizardControl.Controls), TextBox).Text
userProfile.Save()
Then if you need to access that data all you need to do is:
profile.PropertyName ---> profile.ZipCode or profile.State
yousaid
Participant
811 Points
334 Posts
Re: Extending the user Registeration
Jul 23, 2006 03:48 PM|LINK
Yes but I try not to extend MS tables. What happens if MS decides to change their table structure?
I always create my own tables and then use the foreign keys of MS tables to link them.
In that case, my app is portable and if MS changes their table structure, I simply plug in my table.
BUT the biggest problem is that, the profile table is serialized. You can NOT write meaningful queries on them.
Finally, what is the members table in this app used for?
thanks,
yousaid
justin0501
Member
705 Points
138 Posts
Re: Extending the user Registeration
Jul 23, 2006 05:32 PM|LINK
If they decide to make changes, you adapt to those changes and make them at that time. I'm sure if they make a change there will be a way to "upgrade".
I just mentioned the easiest way to "extend" the profile.
But in any case like you said you will just have to create your own table and store all your profile information in that table. Same logic as how it is currently being done, just more code.
I think the members table is just to create the ID which links to the Ads table
What type of queries are you trying to run on the aspnet_profile table. Are you trying to select all members with the PropertyName State for a specific state or something on that order?
justin0501
Member
705 Points
138 Posts
Re: Extending the user Registeration
Jul 23, 2006 05:54 PM|LINK
I did a little searching, check out the following:
http://www.asp.net/sandbox/samp_profiles.aspx?tabindex=0&tabid=1
This seems to be what you are trying to accomplish. I haven't really looked at it as I just found it but it seems rather easy to integrate with your current application in terms of modifications to the classifieds app itself
pedewede
Member
355 Points
97 Posts
Re: Extending the user Registeration
Jul 23, 2006 06:08 PM|LINK
Justin.....I am attempting to do the same thing. You are a life saver....I need your patience though. Please give me the above directions step by step if you don't mind....I am not a advanced user. I would love to implement exactly what you suggested above but I need step by step instructions. Man I would really appreciate it.
Thanks!!!!
A Birdzee Creator
www.birdzee.com or www.housecalltech.com
Mobile: (209)518-4623
peter@birdzee.com
justin0501
Member
705 Points
138 Posts
Re: Extending the user Registeration
Jul 23, 2006 06:48 PM|LINK
You want to use the aspnet_profile table or you want to create your own custom profile as in the link I provided.
I haven't actually tried the method in the link yet, but I have just added PropertyNames and Values into the aspnet_profile table.
If you want to go that route I can help you out but the other method that was in the link I provided I haven't done yet. It does seem easy to implement though. Basically it looks like they provide you with a sql script, then you just put in your database name and run it. I'd imagine the script creates a profile table and either creates new stored procs or alters the current stored procs so you will also need to know what fileds you are going to want and add those into the sql scripts. Then, modify your web.config and your connection strings if you need to.
Let me know which method you are planning on using or if you have any questions. If I can't answer I'm sure someone else can
Thanks
yousaid
Participant
811 Points
334 Posts
Re: Extending the user Registeration
Jul 24, 2006 12:42 PM|LINK
Thanks Justin. I am opting for the method described in the link. It is more portable and is independent of whatever MS decides to do in the future. I can simply plug in my profile stuff and keep going. I will keep you posted.
Have you by any chance run across a documentation for this application? I will be helpful if MS developers that put out these Starter kits included some documentation.
They did so in the kits that came with Framework 1.xxx like ISpy etc.
Cheers,
Yousaid
pedewede
Member
355 Points
97 Posts
Re: Extending the user Registeration
Jul 24, 2006 06:51 PM|LINK
Ultimately I am looking to add a address fields that includes city, state and zip on the Post Ad page. I want my users to be able to search what category is close to them.
Can some give me some dummy instuctions....step by step how to configure and setupA Birdzee Creator
www.birdzee.com or www.housecalltech.com
Mobile: (209)518-4623
peter@birdzee.com
scokim
Member
190 Points
52 Posts
Re: Extending the user Registeration
Jul 24, 2006 09:11 PM|LINK
I'm working through this issue as well but have not been successful. Any comments would be welcomed.