asp.net.ph

HtmlTextArea.Cols Property

System.Web.UI.HtmlControls Namespace   HtmlTextArea Class


Sets or retrieves the display width of the text area.

Syntax


Inline <textarea cols = intChars ... >
Script HtmlTextArea.Cols [ = intChars ]

Property Value


intChars Integer specifying the display width, in characters, of the text area.

The property is read/write with a default value of 20.

Remarks

Use the Cols property to specify or determine the width, in characters, of the HtmlTextArea control.

This property specifies the visible width in average character widths. Users may enter longer lines than specified, and browsers typically wrap the text on the next line of the control.

Note that Internet Explorer® by default wraps text in a <textarea>. The CSS overflow attribute, however, can be used to control scrollbar behavior.

To specify the display height of the control, set the Rows property.

Example

The below code snippet shows how to declaratively set the Cols property of an HtmltextArea control at design time.

<textarea cols=40 rows=5 runat="server"
   value="This is an HtmltextArea that is 5 rows high and 40 characters wide." />

Which would render as follows:


See Also

HtmlTextArea Members   Rows Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph