- HTML Password Web Server Control
In ASP.NET environment,This article describes you how to work with HTML Password Control.In HTML environment, Password is an object that represents a HTML Password in an HTML form. The Password control in a HTML form contains all instance of an <input type="password"> tag.
The Value property of the Password control is posted to the server each time the form is submitted. The Value property for the HtmlInputPassword control is not available in view state.All of these characters are represented as asterisk(*). The MaxLength property specifies the maximum number of characters that can be entered in the text box. The Size property allows you to specify the width of the text box.
There are several functions available to access the HTML Password.some of its funtions are as follows,
- document.getElementById()
- document.getElementByName()
Password Objects Properties
- id -Sets or returns the id of a Password
- form -Returns a reference to the form that contains the Password
- accessKey -Sets or returns the keyboard key to access a Password
- alt -Sets or returns an alternate text to display if a browser does not support Passwords
- disabled -Sets or returns whether or not a Password should be disabled
- tabIndex -Sets or returns the tab order for a Password
- name -Sets or returns the name of a Password
- type -Returns the type of form element a Password is
- maxLength - Sets or returns the maximum number of characters in a text field
- readOnly -Sets or returns whether or not a text field should be read-only
- value -Sets or returns the text that is displayed on the Password
- title -Sets or returns an element's advisory title
- lang -Sets or returns the language code for an element
- dir -Sets or returns the direction of text
- className -Sets or returns the class attribute of an element
Password Objects Methods
- blur() -Performs focus when leave from the control
- click() -Simulates a mouse-click on a Password
- focus() -Performs focus when enter into the control
The following code snippets explains you the HTML Password in the web form.
-
in .aspx page,
-
<html >
<body>
<form id="Form2" runat="server">
<p></p><div>Email</div> <br />
<input id="Text1" type="text" runat="server" />
<p></p><div>Email</div> <br />
<input id="Password1" type="password" runat="server" />
<p></p><input id="Submit1" type="submit" runat="server" value="Submit" />
</form>
</body>
</html>
-
- Related Links
-
4558fe8c-deb6-4
6d91819b-68ac-4952-85b9-299394dd0383|0|.0