Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Login.Authenticate Event

Note: This event is new in the .NET Framework version 2.0.

Occurs when a user is authenticated.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public:
event AuthenticateEventHandler^ Authenticate {
	void add (AuthenticateEventHandler^ value);
	void remove (AuthenticateEventHandler^ value);
}
/** @event */
public void add_Authenticate (AuthenticateEventHandler value)

/** @event */
public void remove_Authenticate (AuthenticateEventHandler value)

JScript supports the use of events, but not the declaration of new ones.

The Authenticate event is raised when a user uses the Login control to log in to a Web site. Custom authentication schemes can use the Authenticate event to authenticate users.

NoteNote

When a user uses the Login control to log in to a Web site, all data in the view state and all post data is lost. Do not perform actions in the Authenticate event that rely on the view state.

For more information about handling events, see Handling and Raising Events.

Notes to Implementers Custom authentication schemes should set the Authenticated property to true to indicate that a user has been authenticated. When a user submits his or her login information, the Login control first raises the LoggingIn event, then the Authenticate event, and finally the LoggedIn event.

The following code example uses the Authenticate event to call site-specific custom authentication code.

No code example is currently available or this language may not be supported.

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.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2015 Microsoft