PasswordRecovery.UserName Property
Assembly: System.Web (in system.web.dll)
[LocalizableAttribute(true)] public: virtual property String^ UserName { String^ get (); void set (String^ value); }
/** @property */ public String get_UserName () /** @property */ public void set_UserName (String value)
public function get UserName () : String public function set UserName (value : String)
Not applicable.
Property Value
The user name entered by the user. The default value is Empty.The UserName property contains the user name entered by the user, or Empty if the user has not entered a name. The UserName property is used only in the UserName view.
The UserName 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 UserName, 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 UserName property.
When you assign a template to the UserName property to display the UserName view, the UserName property is assigned the value entered in a required TextBox control with the ID property set to "UserName".
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 UserName property for a specific membership provider.
Security Note: |
|---|
| 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 (Visual Studio). |
Security Note: