Visual studio

,
HTML controls in ASP.NET


HTML controls allow you to handle server events associated with the tag (a button click, for example), and manipulate the HTML tag programmatically in the Web Form code. When the control is rendered to the browser, the tag is rendered just as it is saved in the Web Form, minus the "runat=server". This gives you precise control over the HTML that is sent to the browser.


Control
Description
Web Form Code Example
Button
A normal button that you can use to respond to Click events
<input type=button runat=server>
Reset Button
Resets all other HTML form elements on a form to a default value
<input type=reset runat=server>
Submit Button
Automatically POSTs the form data to the specified page listed in the Action= attribute in the FORM tag
<input type=submit runat=server>
Text Field
Gives the user an input area on an HTML form
<input type=text runat=server>
Text Area
Used for multi-line input on an HTML form
<input type=textarea runat=server>
File Field
Places a text field and a Browse button on a form and allows the user to select a file name from their local machine when the Browse button is clicked
<input type=file runat=server>
Password Field
An input area on an HTML form, although any characters typed into this field are displayed as asterisks
<input type=password runat=server>
CheckBox
Gives the user a check box that they can select or clear
<input type=checkbox runat=server>
Radio Button
Used two or more to a form, and allows the user to choose one of the controls
<input type=radio runat=server>
Table
Allows you to present information in a tabular format
<table runat=server></table>
Image
Displays an image on an HTML form
<img src="FileName" runat=server>
ListBox
Displays a list of items to the user. You can set the size from two or more to specify how many items you wish show. If there are more items than will fit within this limit, a scroll bar is automatically added to this control.
<select size=2 runat=server ></select>
Dropdown
Displays a list of items to the user, but only one item at a time will appear. The user can click a down arrow from the side of this control and a list of items will be displayed.
<select><option></option></select>
Horizontal Rule
Displays a horizontal line across the HTML page
<hr>