Step 3: Create Custom Properties

After you create additional columns for the User Object table and associate them with data members in Commerce Server Manager in Step 2, you create the actual profile attribute.

In the step you create a new profile property for each of the new data member.

  1. Click Start, point to Programs, point to Microsoft Visual Studio .NET, and then click Microsoft Visual Studio .NET.

  2. In the Microsoft Development Environment [design] – Start Page screen, click Open Project.

  3. In the Open Project dialog box, select the NorthwindTraders project, and then click Open.

  4. In the NorthwindTraders – Microsoft Visual C# .NET [design] – Default.aspx window, click Project on the toolbar, point to Commerce Server Project, and then select Commerce Server Manager.

  5. In the Commerce Server Manager, expand Commerce Server Manager, expand Global Resources, expand Profiles(<Server Name>_NorthwindTraders_commerce), expand Profile Catalog, expand Profile Definitions, and then click User Object.

    Ee810312.note(en-US,CS.20).gifNote

    • The User Object contains all the attributes of the User Profile.
  6. In the content pane, in the Properties list, expand General Information, and then click Add.

  7. In the Add – Web Page Dialog dialog box, select the Adda new property option from the list, and then click OK.

  8. In the Attributes section, do the following:

    Use this To do this
    Name Type u_gender.
    Display name Type Gender.
    Description Type a description for the property.
  9. In the Advanced Attributes section, do the following:

    Use this To do this
    Active Select Yes to specify that the new property is Active.
    Map to data Click the ellipsis [] button to open the Data Source Picker dialog box.

    In the Data Source Picker dialog box, expand ProfileService_SQLSource, expand User Object, and then select Gender (STRING) from the list.

    The data members available for the property are the data members that are not already used in the profile definition you are editing. Properties that are being used by the profile definition are unavailable.

    If you do not map the property to a data member, the property will not be stored in a database, but will be available in memory, for example to store state information while a user is visiting your Web site.

  10. Click OK to close the Data Source Picker dialog box, and then click Apply.

  11. Click Save on the toolbar to save the Gender property to the General Information for the User Object.

  12. In the content pane, in the Properties list, select General Information, and then click Add.

  13. In the Add – Web Page Dialog dialog box, select the Adda new property option from the list, and then click OK.

  14. In the Attributes section, do the following:

    Use this To do this
    Name Type u_userDescription.
    Display name Type User Description.
    Description Type a description for the property.
  15. In the Advanced Attributes section, do the following:

    Use this To do this
    Active Select Yes to specify that the new property is Active.
    Map to data Click the ellipsis [] button to open the Data Source Picker dialog box.

    In the Data Source Picker dialog box, expand ProfileService_SQLSource, expand User Object, and then select User Description (STRING) from the list.

  16. Click OK to close the Data Source Picker dialog box, and then click Apply.

  17. Click Save on the toolbar to save the User Description property to the General Information for the User Object.

  18. Close Commerce Server Manager.

Copyright © 2005 Microsoft Corporation.
All rights reserved.