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

屬性值

目前之 AuthenticationServiceManager 執行實體的 ScriptManager 物件。

屬性

備註

AuthenticationServiceManager這個屬性所傳回的物件代表向頁面註冊的驗證服務。 驗證服務可以在 控制項或相關聯的 ScriptManagerProxy 控制項中定義 ScriptManager

您可以使用 ASP.NET 驗證服務或使用自訂驗證服務。 您可以在標記中加入自訂服務,方法是在頁面上的 元素內 asp:ScriptManager 加入 AuthenticationService 元素,如下列範例所示。

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

您也可以以程式設計方式設定 AuthenticationServiceManager 物件。 服務會在頁面 PreRender 的生命週期階段期間向 控制項註冊 ScriptManager

適用於