ScriptManager.ProfileService Property

Definition

Gets the ProfileServiceManager object that is associated with the current ScriptManager instance.

public:
 property System::Web::UI::ProfileServiceManager ^ ProfileService { System::Web::UI::ProfileServiceManager ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.ProfileServiceManager ProfileService { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.ProfileService : System.Web.UI.ProfileServiceManager
Public ReadOnly Property ProfileService As ProfileServiceManager

Property Value

The ProfileServiceManager object for the current ScriptManager instance.

Attributes

Remarks

The ProfileServiceManager object that is returned by this property represents the profile service that is registered with the page. The profile service can be defined in the ScriptManager control or in an associated ScriptManagerProxy control.

You can use the ASP.NET profile service or use a custom profile service. You can add the custom service in markup by including 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 ProfileServiceManager object. Services are registered with the ScriptManager control during the page's PreRender life-cycle stage.

Applies to