ScriptManager.AuthenticationService 屬性

定義

取得 AuthenticationServiceManager 與目前 ScriptManager 實例相關聯的物件。

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

屬性值

目前實例的AuthenticationServiceManagerScriptManager物件。

屬性

備註

AuthenticationServiceManager由此屬性回傳的物件代表與該頁面註冊的認證服務。 認證服務可以在控制項中定義,或在相關的ScriptManager控制項中定義ScriptManagerProxy

你可以使用 ASP.NET 認證服務,或使用自訂認證服務。 你可以透過在頁面元素中AuthenticationService加入asp:ScriptManager元素,來以標記方式新增自訂服務,如下範例所示。

<asp:ScriptManager ID="SM1" runat="server">
  <AuthenticationService Path="MyAuthenticationService.asmx" />
</asp:ScriptManager>

你也可以程式化地設定物件。AuthenticationServiceManager 服務會在頁面生命ScriptManager週期階段向PreRender控制項註冊。

適用於