Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback

This article demonstrates how to display custom properties in the browser. This requires adding a new handler to the chain of responsibility and adding custom data to the model.

The example shows how to add an organization code custom properties to a user profile.

  1. Open Visual Studio and add a new class for the new handler. Name: GetAccountHandler_Custom.cs

  2. Derive from the HandlerBase\<GetAccountParameter, GetAccountResult>

  3. Add an OrgCode custom property to the collection property of the return object. This can be done by using CurrentContextUserProfile.GetProperty("OrgCode")

  4. Set the Order to 600 so that the base handler is called first in the chain

  5. The code has now been complete and now the user interface needs to be updated to display the organization code. In this example we will update the existing theme but it is recommended to derive a new theme and directive.

  6. Add the following line to the AccountSettings.cshtml directive under the \<h3> at the top of the page.

  7. Rebuild the solution and view the results. The OrgCode can now be managed from within the Admin Console