UserValidatedEventArgs UserValidatedEventArgs UserValidatedEventArgs UserValidatedEventArgs Class


Provides data for the UserValidated event.

public ref class UserValidatedEventArgs : EventArgs
public class UserValidatedEventArgs : EventArgs
type UserValidatedEventArgs = class
    inherit EventArgs
Public Class UserValidatedEventArgs
Inherits EventArgs


The following example code demonstrates how to use this class to display the user name in the title bar of a form.

private ClientFormsAuthenticationMembershipProvider formsMembershipProvider =
private String appName = "ClientAppServicesDemo";

private void AttachUserValidatedEventHandler()
    formsMembershipProvider.UserValidated += 
        new EventHandler<UserValidatedEventArgs>(Form1_UserValidated);

private void Form1_UserValidated(object sender, UserValidatedEventArgs e)
    // Set the form's title bar to the application name and the user name.
    this.Text = String.Format("{0} ({1})", appName, e.UserName);
Private WithEvents formsMembershipProvider As  _
    ClientFormsAuthenticationMembershipProvider = _

Private appName As String = "ClientAppServicesDemo"

Private Sub Form1_UserValidated(ByVal sender As Object, _
    ByVal e As UserValidatedEventArgs) _
    Handles formsMembershipProvider.UserValidated

    ' Set the form's title bar to the application name and the user name.
    Me.Text = String.Format("{0} ({1})", appName, e.UserName)

End Sub


This class provides access to the user name of the validated user through the UserName property.

For more information about how to handle events, see Handling and Raising Events.


UserValidatedEventArgs(String) UserValidatedEventArgs(String) UserValidatedEventArgs(String) UserValidatedEventArgs(String)

Initializes a new instance of the UserValidatedEventArgs class.


UserName UserName UserName UserName

Gets the user name of the validated user.


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also