Profile System Asp.net 2005

Discussion in 'ASP .Net' started by vishnu@visrez.com, Nov 24, 2006.

  1. Guest

    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
    , Nov 24, 2006
    #1
    1. Advertising

  2. 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


    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "" wrote:

    > 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
    >
    >
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Nov 25, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Juan T. Llibre
    Replies:
    0
    Views:
    438
    Juan T. Llibre
    Jun 7, 2005
  2. Brad
    Replies:
    1
    Views:
    1,123
    Roedy Green
    Jul 19, 2005
  3. Navin Mishra
    Replies:
    4
    Views:
    377
    =?Utf-8?B?UGVyc2hpbmc=?=
    Oct 20, 2006
  4. Andy B
    Replies:
    0
    Views:
    508
    Andy B
    May 3, 2008
  5. Steven
    Replies:
    5
    Views:
    467
    Steven
    Oct 24, 2008
Loading...

Share This Page