ASP.NET HTML Server Controls

## ASP.NET Tutorial

ASP.NET HOME ASP.NET Intro

## WP Tutorial

WebPages Intro WebPages Razor WebPages Layout WebPages Folders WebPages Global WebPages Forms WebPages Objects WebPages Files WebPages Databases WebPages Helpers WebPages WebGrid WebPages Charts WebPages Email WebPages PHP WebPages Publish WebPages Examples

## WP References

WebPages Classes WebPages Security WebPages Database WebPages WebMail WebPages Helpers

## ASP.NET Razor

Razor Intro Razor Syntax Razor C# Variables Razor C# Loops Razor C# Logic Razor VB Variables Razor VB Loops Razor VB Logic

## ASP.NET MVC

MVC Intro MVC Application MVC Folders MVC Layout MVC Controllers MVC Views MVC Database MVC Models MVC Security MVC HTML Helpers MVC Publish MVC Reference

## WF Tutorials

WebForms Intro WebForms Pages WebForms Controls WebForms Events WebForms Forms WebForms ViewState WebForms TextBox WebForms Button WebForms Data Binding WebForms ArrayList WebForms Hashtable WebForms SortedList WebForms XML Files WebForms Repeater WebForms DataList WebForms DbConnection WebForms Master Pages WebForms Navigation WebForms Examples

## WF References

WebForms HTML WebForms Controls WebForms Validation

# ASP.NET Web Forms - HTML Controls

« Previous
Next Chapter »

HTML server controls are HTML tags understood by the server.

## HTML Server Controls

HTML elements in ASP.NET files are, by default, treated as text. To make these elements programmable, add a runat="server" attribute to the HTML element. This attribute indicates that the element should be treated as a server control.

Note: All HTML server controls must be within a <form> tag with the runat="server" attribute!

Note: ASP.NET requires that all HTML elements must be properly closed and properly nested.

HTML Server Control | Description
--- | ---
HtmlAnchor | Controls an <a> HTML element
HtmlButton | Controls a <button> HTML element
HtmlForm | Controls a <form> HTML element
HtmlGeneric | Controls other HTML element not specified by a specific HTML server control, like <body>, <div>, <span>, etc.
HtmlImage | Controls an <image> HTML element
HtmlInputButton | Controls <input type="button">, <input type="submit">, and <input type="reset"> HTML elements
HtmlInputCheckBox | Controls an <input type="checkbox"> HTML element
HtmlInputFile | Controls an <input type="file"> HTML element
HtmlInputHidden | Controls an <input type="hidden"> HTML element
HtmlInputImage | Controls an <input type="image"> HTML element
HtmlInputRadioButton | Controls an <input type="radio"> HTML element
HtmlInputText | Controls <input type="text"> and <input type="password"> HTML elements
HtmlSelect | Controls a <select> HTML element
HtmlTable | Controls a <table> HTML element
HtmlTableCell | Controls <td>and <th> HTML elements
HtmlTableRow | Controls a <tr> HTML element
HtmlTextArea | Controls a <textarea> HTML element

« Previous
Next Chapter »

## Your suggestion:

Your E-mail (optional):

Page address:

Description:

Close [X]

## Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

## WEB HOSTING

Best Web Hosting UK Reseller Hosting Wow! $5 SSD Hosting

## WEB BUILDING

Download XML Editor
FREE Website BUILDER FREE Website Creator

## WEB RESOURCES

Web Statistics Web Validation

## SHARE THIS PAGE