ProfileServiceManager 类

定义

配置一组预加载的配置文件属性和配置文件服务的自定义实现的位置。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
type ProfileServiceManager = class
Public Class ProfileServiceManager
继承
ProfileServiceManager
属性

注解

类与ProfileService可以添加到或ScriptManagerProxy控件的属性相对应。 ScriptManager ProfileServiceManagerThe ProfileServiceManager class corresponds to the ProfileService property that can be added to the ScriptManager or ScriptManagerProxy control.

可以使用ProfileServiceManager指定一组配置文件属性, 这些属性将在页面呈现时预加载并可用于客户端脚本。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. 此外, 你还可以使用此类来提供用于在脚本中加载或保存配置文件属性的 Web 服务的替代实现的路径, 而不是使用 ASP.NET 的 AJAX 功能提供的内置配置文件 Web 服务。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. 如果使用内置配置文件 Web 服务, 而不必预先加载属性, 则无需在页面上显式声明配置文件服务管理器。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.

若要以声明方式指定一组预加载的属性或自定义配置文件 Web <ProfileService>服务, 请<asp:ScriptManager>在页面的元素内包含一个元素, 如下面的示例所示。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>  

还可以通过编程方式将配置文件服务配置为预加载属性或使用自定义配置文件 Web 服务。You can also programmatically configure the profile service to preload properties or to use a custom profile Web service.

下面的示例演示必须在自定义配置文件 Web 服务中实现的基本类结构。The following example shows the basic class structure that must be implemented in a custom profile Web service.

构造函数

ProfileServiceManager()

初始化 ProfileServiceManager 类的新实例。Initializes a new instance of the ProfileServiceManager class.

属性

LoadProperties

获取或设置一个数组,其中包含可用于客户端脚本的配置文件属性。Gets or sets an array that contains the profile properties that will be made available to client script.

Path

获取或设置配置文件 Web 服务的自定义实现的路径。Gets or sets the path of a custom implementation of the profile Web service.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅