Uredi

Deli z drugimi prek


ProfileServiceManager Class

Definition

Configures a set of preloaded profile properties and the location of a custom implementation of the profile service.

public ref class ProfileServiceManager
[System.ComponentModel.TypeConverter(typeof(System.Web.UI.EmptyStringExpandableObjectConverter))]
public class ProfileServiceManager
[<System.ComponentModel.TypeConverter(typeof(System.Web.UI.EmptyStringExpandableObjectConverter))>]
type ProfileServiceManager = class
Public Class ProfileServiceManager
Inheritance
ProfileServiceManager
Attributes

Remarks

The ProfileServiceManager class corresponds to the ProfileService property that can be added to the ScriptManager or ScriptManagerProxy control.

You can use ProfileServiceManager to specify a set of profile properties that will be preloaded when the page is rendered and will be available to client script. Also, instead of using the built-in profile Web service provided by AJAX features of ASP.NET, you can use this class to provide the path of an alternative implementation of the Web service that will be used for loading or saving profile properties from script.

To use the profile service in your application, you must enable it in the configuration file. If you use the built-in profile Web service and do not have to preload properties, you do not have to explicitly declare the profile service manager on the page.

To declaratively specify a set of preloaded properties, or a custom profile Web service, include a <ProfileService> element inside the <asp:ScriptManager> element on the page, as shown in the following example.

<asp:ScriptManager ID="SM1" runat="server">  
  <ProfileService LoadProperties="propertyA,propertyB" Path="MyProfileService.asmx" />  
</asp:ScriptManager>  

You can also programmatically configure the profile service to preload properties or to use a custom profile Web service.

The following example shows the basic class structure that must be implemented in a custom profile Web service.

Constructors

ProfileServiceManager()

Initializes a new instance of the ProfileServiceManager class.

Properties

LoadProperties

Gets or sets an array that contains the profile properties that will be made available to client script.

Path

Gets or sets the path of a custom implementation of the profile Web service.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also