How to customize the display and editing of Asp.Net Profile properties
The Asp.Net Profile system lets you easily define information which is associated with individual users without requiring you to create or maintain your own database. You can enable and configure the Profile feature by updating your application's web.config file as shown here:
When you enable profiles in your web application as shown above, Asp.Net uses a built-in profile provider called the SqlProfileProvider that stores information in a Sql Server database table called "aspnet_Profile". This table is probably in your database already but Microsoft provides tools for adding it if needed. In most cases, the Asp.Net Profile system "just works" and lets you instantly add user information fields to your application.
Dot Net Dash detects whether you have enabled profiles and automatically builds a user interface to display and edit text, date/time or numeric properties.
Dot Net Dash works with custom Profile Providers
You don't have to do anything special to get Dot Net Dash to work a custom profile provider since the "default profile provider" is used to retrieve and save information for each user.
Customizing the display
While the Asp.Net Profile system handles the definition, retrieval and storage of custom user information, it does not have any mechanism for controlling the display. By default, Dot Net Dash will present scalar profile properties sorted by property name and with the property name as a label.
To customize the way that properties are displayed, you may set the "customProviderData" attribute for each property definition in your web.config file.
The attributes of each profile property are used to determine how fields in the Edit Profile Dialog are laid out. The readOnly attribute determines whether the field is editable while the customProviderData attribute contains a comma-delimited string with key/value pairs that define other custom properties.
The string is not case sensitive and spaces after commas are ignored. Each key/value pair is optional but certain pairs such as multi-line and height are only recognized for string properties.
|Position||determines which fields are displayed first||integer||999|
|Label||specifies a custom label||string||property name|
|hidden||hides the property||boolean||false|
|multiline||indicates multi-line for text fields||boolean||false|
|height||specifies height of multi-line textbox||integer||100|
Properties for which you specify a "position" will appear before those for which you do not. Properties with the same (or unspecified) position will be displayed in the order of property name.
Dot Net Dash ignores custom and binary profile properties
Dot Net Dash will only display scalar properties (numeric, string, date/time). If your profile configuration includes properties of a user-defined type, those properties will simply be ignored.