Re: Profile not saving



Unless the email is also the user name, or you are using a custom profile provider, you are not pulling up the user. You can test this in debug by setting a breakpoint here:

pc.FirstName = MemberFirstName;

See if you have an object that is filled with your user.

The signature for Create is UserName, not email, so check this.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************
"Ismail" <ismail.mayat@xxxxxxxxxxxxx> wrote in message news:1173287336.932941.229360@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,

I am using asp.net20 membership. I have some properties in
web.config

<properties>
<add name="FirstName" type="System.String" allowAnonymous="true"/>
<add name="LastName" type="System.String" allowAnonymous="true"/>
<add name="JobTitle" type="System.String" allowAnonymous="true"/>

<properties>

in my update profile code i have

ProfileCommon pc =
(ProfileCommon)System.Web.Profile.ProfileBase.Create(Membership.GetUser().Email,
true);
pc.FirstName = MemberFirstName;
pc.LastName = MemberLastName;
pc.JobTitle = MemberJobTitle;
pc.Save();

I dont get any errors and nothing gets saved. When the member first
registers and enters these profile fields they are captured and saved
however when user later tries to update they cannot.

Anyone any ideas.

Thanks in advance.

Ismail


.



Relevant Pages

  • Re: Groups / Profiles and ASP.NET
    ... I have been doing some initial reading about ASPNETDB and Membership ... I would personally consider at least a custom Profile Provider, as the Profile model is problematic on many levels. ... If so, the group feature is merely a list of groups the person "joins" with an approval flag and is different from a role. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Best Approach for Membership / Profile Information
    ... the Membership table. ... my calling membership.create user and get the other fields saved by ... I want to display their name on my master page. ... However, since Profile is not ...
    (microsoft.public.dotnet.framework.aspnet)
  • Best Approach for Membership / Profile Information
    ... I've created a custom login control with values that are not used in ... the Membership table. ... I want to display their name on my master page. ... However, since Profile is not ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: "Unable to connect to SQL Server database" error when using profile
    ... Membership and Profile are two completely separate sections in the ... but custom profile and role providers. ... This is where I get an error: Unable to connect to SQL Server database ...
    (microsoft.public.dotnet.framework.aspnet)
  • Groups / Profiles and ASP.NET
    ... I have been doing some initial reading about ASPNETDB and Membership ... Is that is the Profile Manager more dynamic than the simple storing of ... ASP.NET membership API but not much about Groups... ...
    (microsoft.public.dotnet.framework.aspnet)