Re: Profile not saving
- From: "Cowboy \(Gregory A. Beamer\)" <NoSpamMgbworld@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 7 Mar 2007 11:48:59 -0600
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
.
- Follow-Ups:
- Re: Profile not saving
- From: Ismail
- Re: Profile not saving
- References:
- Profile not saving
- From: Ismail
- Profile not saving
- Prev by Date: Re: WebServer to host ASP.NET applications
- Next by Date: Re: how to access html <hr> in code-behind?
- Previous by thread: Re: Profile not saving
- Next by thread: Re: Profile not saving
- Index(es):
Relevant Pages
|