The topics that follow show you how to use some of the common server controls. For the most part, it’s just a matter of dragging a control onto a form and using the Properties window to set the Appearance and Behavior properties (or attributes) that make the control work the way you want it to.For a SingleLine control (the default), the TextMode attribute can be used to specify the HTML type attribute for the input element that’s generated for the control. If, for example, you set the TextMode attribute to Password, the charac¬ters that the user enters are masked so they can’t be read.Beyond that, the TextMode attribute can be used to specify the HTML5 type attributes that are listed in this figure. For instance, the TextMode attribute can be set to “email” if the text box is supposed to get an email address, and it can be set to tel if the text box is supposed to get a telephone number. For semantic reasons, it’s good to set these HTML5 attributes because they indicate what type of data each control is for.At present, though, the browser support for the HTML5 type attributes varies from one browser to another. At this writing, for example, Firefox, Chrome, and Opera support the email type by providing automatic data validation for the entry in the text box, but Internet Explorer and Safari treat an email text box just like any other text box. Similarly, Opera fully supports the datetime type by offering a calendar widget when the text box receives the focus, but the other browsers treat a datetime text box just like any other text box.In contrast, the browsers for mobile devices do a better job of supporting the HTML5 type attributes. For instance, the iPhone and iPad support the email and
đang được dịch, vui lòng đợi..
