Sir i have created a Profile Provider in which i am taking values from text-box at my Registration page.So my question is how do i create a data-table so that each profile property is stored in different columns in the database.And, how do i manage the UserId
if i am creating different database table.
mobius_asp1
Member
3 Points
3 Posts
How Do I connect the user data table with custom table
Feb 14, 2010 12:01 PM|LINK
HEllo,
I want to add 4 extra filed to the user datain the BeerHouse Framework . Bassically I want 4 more fields to be associated with the user
The fieldare as follows :
DateOfJoin(DateTime)
DateOfLeave(DateTime)
Graduation(string)
PostGraduation (string)
How do I connect the tables. ?
anupharihara...
Member
158 Points
31 Posts
Re: How Do I connect the user data table with custom table
Feb 14, 2010 01:47 PM|LINK
Well you dont have to create the tables .
The profile provider will take care of that .
All you have to do is to add the additional code inside the <!--Anup Hariharan Nair--> section in the web.config file.
Yuor Profile provider will become like the following :
<profile defaultProvider="TBH_ProfileProvider"> <providers> <add name="TBH_ProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers> <properties> <add name="FirstName" type="String" /> <add name="LastName" type="String" /> <add name="Gender" type="String" /> <add name="BirthDate" type="DateTime" /> <add name="Occupation" type="String" /> <add name="Website" type="String" /> <add name="ShoppingCart" type="MB.TheBeerHouse.BLL.Store.ShoppingCart" serializeAs="Binary" allowAnonymous="true" /> <group name="Forum"> <add name="Posts" type="Int32" /> <add name="AvatarUrl" type="String" /> <add name="Signature" type="String" /> </group> <group name="Address"> <add name="Street" type="String" /> <add name="PostalCode" type="String" /> <add name="City" type="String" /> <add name="State" type="String" /> <add name="Country" type="String" /> </group> <group name="Contacts"> <add name="Phone" type="String" /> <add name="Fax" type="String" /> </group> <group name="Preferences"> <add name="Theme" type="String" allowAnonymous="true" /> <add name="Culture" type="String" defaultValue="en-US" /> <add name="Newsletter" type="MB.TheBeerHouse.BLL.Newsletters.SubscriptionType" /> </group> <!-- Anup Hariharan Nair--> <add name="DateOfJoin" type="DateTime" /> <add name="DateOfLeave" type="DateTime" /> <add name="Graduation" type="String" /> <add name="PostGraduation" type="String" /> <!-- Anup Hariharan Nair--> </properties> </profile>Thanks,
Anup Hariharan Nair
http://alterfiction.com/
http://in.linkedin.com/in/anuphariharan
mobius_asp1
Member
3 Points
3 Posts
Re: How Do I connect the user data table with custom table
Feb 14, 2010 08:31 PM|LINK
How will this work ?
How will I access the DAteofJoin for individual user.
Thanks in advance...
anupharihara...
Member
158 Points
31 Posts
Re: How Do I connect the user data table with custom table
Feb 14, 2010 08:36 PM|LINK
Hmm... its Profile Provider credential system.
Refer the following video :
http://www.asp.net/%28S%28ywiyuluxr3qb2dfva1z5lgeg%29%29/learn/videos/video-190.aspx
Thanks,
Anup Hariharan Nair
http://alterfiction.com/
http://in.linkedin.com/in/anuphariharan
mobius_asp1
Member
3 Points
3 Posts
Re: How Do I connect the user data table with custom table
Feb 14, 2010 08:38 PM|LINK
Okkkes... Its a good system for credential Management.
Thanks anuphariharan
anupharihara...
Member
158 Points
31 Posts
Re: How Do I connect the user data table with custom table
Feb 14, 2010 08:40 PM|LINK
No problem,
Happy to help..
Thanks,
Anup Hariharan Nair
http://alterfiction.com/
http://in.linkedin.com/in/anuphariharan
AmolN
Member
2 Points
2 Posts
Re: How Do I connect the user data table with custom table
May 16, 2011 09:24 AM|LINK
Sir i have created a Profile Provider in which i am taking values from text-box at my Registration page.So my question is how do i create a data-table so that each profile property is stored in different columns in the database.And, how do i manage the UserId if i am creating different database table.