Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
hi,
i m creating the registration page using usercontrol.I m using Default Membership provider.i have set the custom profile fields in web.config as follows.
<profile defaultProvider="UmbracoMemberProfileProvider" enabled="true">
<providers>
<clear/>
<add name="UmbracoMemberProfileProvider" type="umbraco.providers.members.UmbracoProfileProvider, umbraco.providers"/>
</providers>
<properties>
<add name="first_name" allowAnonymous="false" provider="UmbracoMemberProfileProvider" type="System.String"/>
</properties>
</profile>
my code behind is.
CreateUserWizard cuw = (CreateUserWizard)sender;
MembershipUser user = Membership.GetUser(cuw.UserName);
if (user != null)
{
Roles.AddUserToRole(cuw.UserName, "SiteMembers");
Profile.Save();
}
now i when i run the register page i m only able to save the standard fileds like email and username.
i want to map this custom field directly from the create wizard and set the value from it instead of setting them through code behind.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Automatically Set Custom Profile Fields using Create Wizard.
hi,
i m creating the registration page using usercontrol.I m using Default Membership provider.i have set the custom profile fields in web.config as follows.
<profile defaultProvider="UmbracoMemberProfileProvider" enabled="true">
<providers>
<clear/>
<add name="UmbracoMemberProfileProvider" type="umbraco.providers.members.UmbracoProfileProvider, umbraco.providers"/>
</providers>
<properties>
<clear/>
<add name="first_name" allowAnonymous="false" provider="UmbracoMemberProfileProvider" type="System.String"/>
</properties>
</profile>
my code behind is.
CreateUserWizard cuw = (CreateUserWizard)sender;
MembershipUser user = Membership.GetUser(cuw.UserName);
if (user != null)
{
Roles.AddUserToRole(cuw.UserName, "SiteMembers");
Profile.Save();
}
now i when i run the register page i m only able to save the standard fileds like email and username.
i want to map this custom field directly from the create wizard and set the value from it instead of setting them through code behind.
is working on a reply...