Profile System Asp.net 2005

V

vishnu

I am working on Profile system.I am using CreateUserWizard control for
creating New User.I want to add more information other than
(UserName,Email,Password,ConfirmPassword.....) such as
Country,Gender,Age.So I need to use Profile system.


I added the following code in web.config file:


<profile enabled="true">
<providers>
<add name="AspNetSqlProvider"
connectionStringName="EmailSystemConnectionString" plicationName="/"
type="System.Web.Profile.SqlProfileProvider"></add>
</providers>
<properties>
<add name="Country" type="string"/>
<add name="Gender" type="string"/>
<add name="Age" type="string"/>
</properties>
</profile>
</system.web>


I added the Following code in .cs file


protected void CreateUserWizard1_CreatedUser(object sender, EventArgs
e)
{
ProfileCommon p =
(ProfileCommon)ProfileCommon.Create(CreateUserWizard1.UserName, true);
p.Country = "INDIA";
p.Gender = "MALE";
p.Age = "MALE";
p.Save();

}

Code is working fine with out any errors.But After successful Run I
can't see any values under the table aspnet_Profile.Is anything else to
be added.


Thanks
Vishnu Priya
 
G

Guest

The built-in Profile Provider serializes all Profile properties to opaque
text or binary in a single table column.
If you want discombobulated Profile entries in a typical Database table with
a column for each profile Property, then you need to look at the custom Table
provider and / or Stored Procedure providers.

Example (there are many others):
http://www.eggheadcafe.com/articles/20060731.asp

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top