1 out of 1 rated this helpful - Rate this topic

System.Web.UI.HtmlControls Namespace

The System.Web.UI.HtmlControls namespace contains classes that allow you to create HTML server controls on a Web Forms page. HTML server controls run on the server and map directly to standard HTML tags supported by most browsers. This allows you to programmatically control the HTML elements on a Web Forms page.

  Class Description
Public class HtmlAnchor Allows programmatic access to the HTML <a> element on the server.
Public class HtmlButton Allows programmatic access to the HTML <button> tag on the server.
Public class HtmlContainerControl Serves as the abstract base class for HTML server controls that map to HTML elements that are required to have an opening and a closing tag.
Public class HtmlControl Defines the methods, properties, and events common to all HTML server controls in the ASP.NET page framework.
Public class HtmlEmptyTagControlBuilder Interacts with the page parser to build HTML server controls that do not have a body or closing tag. This class cannot be inherited.
Public class HtmlForm Provides programmatic access to the HTML <form> element on the server.
Public class HtmlGenericControl Defines the methods, properties, and events for all HTML server control elements not represented by a specific .NET Framework class.
Public class HtmlHead Provides programmatic access to the HTML <head> element on the server.
Public class HtmlHeadBuilder Interacts with the parser to build an HtmlHead control.
Public class HtmlImage Provides programmatic access for the HTML <img> element on the server.
Public class HtmlInputButton Allows programmatic access to the HTML <input type= button>, <input type= submit>, and <input type= reset> elements on the server.
Public class HtmlInputCheckBox Allows programmatic access to the HTML <input type= checkbox> element on the server.
Public class HtmlInputControl Serves as the abstract base class that defines the methods, properties, and events common to all HTML input controls, such as the <input type=text>, <input type=submit>, and <input type= file> elements.
Public class HtmlInputFile Allows programmatic access to the HTML <input type= file> element on the server.
Public class HtmlInputHidden Allows programmatic access to the HTML <input type=hidden> element on the server.
Public class HtmlInputImage Allows programmatic access to the HTML <input type= image> element on the server.
Public class HtmlInputPassword Allows programmatic access to the HTML <input type= password> element on the server.
Public class HtmlInputRadioButton Allows programmatic access to the HTML <input type= radio> element on the server.
Public class HtmlInputReset Allows programmatic access to the HTML <input type=reset> element on the server.
Public class HtmlInputSubmit Allows programmatic access to the HTML <input type= submit> element on the server.
Public class HtmlInputText Allows programmatic access to the HTML <input type= text> and <input type= password> elements on the server.
Public class HtmlLink Allows programmatic access to the HTML <link> element on the server.
Public class HtmlMeta Allows programmatic access to the HTML <meta> tag on the server.
Public class HtmlSelect Allows programmatic access to the HTML <select> element on the server.
Public class HtmlSelectBuilder Interacts with the parser to build an HtmlSelect control.
Public class HtmlTable Allows programmatic access on the server to the HTML <table> element.
Public class HtmlTable.HtmlTableRowControlCollection Represents a collection of HtmlTableRow objects that are the rows of an HtmlTable control.
Public class HtmlTableCell Represents the <td> and <th> HTML elements in an HtmlTableRow object.
Public class HtmlTableCellCollection A collection of HtmlTableCell objects that represent the cells in a single row of an HtmlTable control. This class cannot be inherited.
Public class HtmlTableRow Represents the <tr> HTML element in an HtmlTable control.
Public class HtmlTableRow.HtmlTableCellControlCollection Represents a collection of HtmlTableCell objects that are the cells of an HtmlTableRow control.
Public class HtmlTableRowCollection A collection of HtmlTableRow objects that represent the rows of an HtmlTable control. This class cannot be inherited.
Public class HtmlTextArea Allows programmatic access to the <textarea> HTML element on the server.
Public class HtmlTitle Allows programmatic access to the HTML <title> element on the server.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Enabling intellisense in VS 2005 with HtmlControls

You may find that after having manually added "runat=server" and given a unique ID to a HtmlControl in the HTML of your page that you do not have intellisense for it in your codebehind file.  This is due to VS not properly handling your manual changes.  Instead, follow the steps below to add the "runat=server" attribute.

To enable intellisense in the codebehind file for HtmlControls on your webpage:

  1. Drag the HTML control you wish to use from the toolbox and place it on the webpage in the designer.
  2. Give the control a unique ID using the designer or by entering it manually in the code view of the designer.
  3. IMPORTANT:  Right-click on the control and select "Run As Server Control" in the designer.  Do not add the "runat=server" attribute manually!
  4. Profit via intellisense.

 

If your HtmlControl already has the "runat=server" attribute, right click on the control and clear "Run As Server Control", then right click on the control and select it.