You can convert a text box into a password control, where the text the user types is masked with asterisks (*). You can see this in the Textboxes example on the CD-ROM in Figure 15.8. You create a password control by setting a text box's TextMode property to Password, as I've done for the text box under the button in the Textboxes example. In HTML, this becomes an <input> element with the type attribute set to "password":
<input name="TextBox3" type="password" id="TextBox3" style="height:24px;width:118px;Z-INDEX: 104; LEFT: 101px; POSITION: absolute; TOP: 146px" />
In code, you can read the text in the password control using the control's Text property, as I do in the Textboxes example, where I transfer the text from the password control to the text box under it, like this:
You can see the result in Figure 15.8.
Although the security of password controls isn't to be relied on too heavily, it's worth noting that the browser is smart enough to thwart someone who just tries to copy the masked password and paste it into another application to read it; you can't actually copy password text, because nothing is placed into the clipboard when you try.