Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • aditya 6 posts 26 karma points
    Feb 03, 2012 @ 12:49
    aditya
    0

    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.

     

     

Please Sign in or register to post replies

Write your reply to:

Draft