Gets or sets the text that appears in the User Name text box.
Assembly: System.Web (in System.Web.dll)
The property contains the user name entered by the user, or Empty if the user has not entered a name. The property is used only in the UserName view.
The property is saved in the PasswordRecovery control's control state to preserve the values between round trips to the server even when view state is turned off for the page. PasswordRecovery control properties represented by text boxes, such as , are accessible during all phases of the page life cycle. The control will pick up any changes made by the end user by means of the TextChanged event triggered by the textboxes.
The style settings in the TextBoxStyle property define the appearance of the text in the property.
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and ASP.NET Globalization and Localization.
The following code example changes the property for a specific membership provider.
This example contains a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2