Export (0) Print
Expand All
Expand Minimize

CreateUserWizard.UserName Property

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

Gets or sets the user name entered by the user.

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

public virtual string UserName { get; set; }
/** @property */
public String get_UserName ()

/** @property */
public void set_UserName (String value)

public function get UserName () : String

public function set UserName (value : String)

Property Value

The user name entered by the user. The default value is an empty string ("").

If a user name is required by the membership provider specified in the MembershipProvider property, then the user name text box will appear on the CreateUserWizard control. Each text box displayed on the CreateUserWizard control has a RequiredFieldValidator object associated with it.

The following code example sets the UserName property to all lowercase alphabetical characters in the CreatingUser event.

<%@ page language="C#"%>

<script runat="server">

  void Createuserwizard1_LoggingIn(object sender, EventArgs e)
  {
    // Make user the UserName field is lower case before logging in.
    Createuserwizard1.UserName.ToLower();
  }
</script>

<html>
<head runat="server">
    <title>CreateUserWizard.LogginIn sample</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <asp:createuserwizard id="Createuserwizard1" runat="server" 
        onloggingin="Createuserwizard1_LoggingIn">
      </asp:createuserwizard>
    </div>
    </form>
</body>
</html>

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:
© 2014 Microsoft