System.Web 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Web.UI.HtmlControls.HtmlControl

The most common controls with a closing tag are the <form>, <table>, <tr>, <td>, <a>, and <span> elements.

The and properties allow you to manipulate the content between the opening and closing tags of -derived controls.

For a list of initial property values for an instance of , see the constructor.

A new instance of this class is not created directly.

If you use the property to specify the text between the opening and closing tags of an HTML server control, the text is not HTML encoded. This makes it possible to embed script within HTML tags in the text. When using the property, be sure to validate the value to reduce security vulnerabilities. Otherwise, consider using the property instead.

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.

- Constructor

  Use this constructor to create and initialize a new instance of the class using default values.

  An instance of this class is not created directly. This constructor is called from the constructor of other HTML control classes to initialize properties defined in this class.

  The following table shows initial property values for an instance of .

  Property

  Initial Value

  The "span" literal string.

  Initializes a new instance of the class using default values.

  1.0.5000.0
  2.0.0.0
- Constructor

  Use this constructor to create and initialize a new instance of the class using the specified tag.

  An instance of this class is not created directly. This constructor is called from the constructor of other HTML control classes to initialize properties defined in this class.

  The following table shows initial property values for an instance of .

  Property

  Initial Value

  The value specified by the parameter.

  Initializes a new instance of the class using the specified tag name.

  A string that specifies the tag name of the control.
  1.0.5000.0
  2.0.0.0
- Method
  System.Web.UI.ControlCollection To be added a To be added 1.0.5000.0 2.0.0.0
- Property
  System.String To be added: an object of type 'string'

  Use the property to programmatically modify the contents between the opening and closing tags of an HTML server control.

  The property does not automatically encode special characters to and from HTML entities. HTML entities allow you to display special characters, such as the < character, that a browser would ordinarily interpret as having special meaning. The < character would be interpreted as the start of a tag and is not displayed on the page. To display the < character, you would need to use the entity &lt;.

  For example, if the property is set to "<b> Hello </b>", the < and > characters are not converted to &lt; and &gt;, respectively. The rendered output would still be: <b> Hello </b>. The browser will detect the <b> tags and display the text, Hello, in a bold font.

  Because the text is not HTML encoded, it possible to embed script within HTML tags in the text. If this property is set dynamically using user input, be sure to validate the value to reduce security vulnerabilities. For more information, see Security and User Input.

  To provide automatic HTML encoding and decoding, use the property.

  If there are no child controls, the property contains the value .

  Gets or sets the content found between the opening and closing tags of the specified HTML server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Property
  System.String To be added: an object of type 'string'

  Use the property to programmatically modify the text between the opening and closing tags of an HTML server control.

  Unlike the property, the property automatically encodes special characters to and from HTML entities. HTML entities allow you to display special characters, such as the < character, that a browser would ordinarily interpret as having special meaning. The < character would be interpreted as the start of a tag and is not displayed on the page. To display the < character, you would need to use the entity &lt;.

  For example, if the property is set to "<b> Hello </b>", the < and > symbols are converted to &lt; and &gt;, respectively. The rendered output would be: &lt; b &gt; Hello &lt; /b &gt;. The &lt; and &gt; entities would indicate to the browser that these characters are to be displayed on the page. The browser will not detect the <b> tags and display the text in a bold font. The text displayed on the page is: <b> Hello </b>.

  To prevent automatic HTML encoding and decoding, use the property.

  If there are no child controls, the property contains the value .

  Gets or sets the text between the opening and closing tags of the specified HTML server control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Method
  System.Void ``

  This method is used primarily by the .NET Framework infrastructure and is not intended to be used directly from your code. However, control developers can override this method to specify how a custom server control restores its view state. For more information, see ASP.NET State Management Overview.

  The method calls the base class's method. In addition, the method sets the property.

  Restores the control's view state from a previous page request that was saved by the method.

  An that represents the control state to be restored. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  The method overrides the method to render the opening tag, child controls, and closing tag of the control.

  The method is used primarily by control developers extending the functionality of the control.

  Renders the control to the specified object.

  The that receives the content. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` To be added

  Renders the control's attributes to the specified object.

  The instance that receives the rendered content. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  The method is called by the method to render the closing tag of the control.

  The method is used primarily by control developers extending the functionality of the control.

  Renders the closing tag for the control to the specified object.

  The that receives the rendered content. 1.0.5000.0 2.0.0.0