AuthenticateEventArgs Class
.NET Framework 2.0
Note: This class is new in the .NET Framework version 2.0.
Provides data for the Authenticate event.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The AuthenticateEventArgs class provides the data needed for the Authenticate event. Custom authentication schemes for a Web site use the Authenticated property to indicate whether a user's login attempt succeeded.
The following code example uses the AuthenticateEventArgs class to pass data to a custom authentication method.
<%@ Page Language="VB" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <SCRIPT runat="server"> Function SiteSpecificAuthenticationMethod(ByVal UserName As String, ByVal Password As String) As Boolean ' Insert code that implements a site-specific custom ' authentication method here. ' ' This example implementation always returns false. Return False End Function Sub OnAuthenticate(ByVal sender As Object, ByVal e As AuthenticateEventArgs) Dim Authenticated As Boolean Authenticated = SiteSpecificAuthenticationMethod(Login1.UserName, Login1.Password) e.Authenticated = Authenticated End Sub </SCRIPT> <HTML> <BODY> <FORM runat="server"> <asp:Login id="Login1" runat="server" OnAuthenticate="OnAuthenticate"> </asp:Login> </FORM> </BODY> </HTML>
- AspNetHostingPermission For operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission For operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Community Additions
ADD
Show: