Please visit our sponsors !
HtmlTextArea Control
Definition and Usage
The HtmlTextArea control is used to control a <textarea> element. In HTML, the <textarea>
element is used to create a text area.
Properties and Events
Property |
Description |
Cols |
The number of columns of the text area |
id |
A unique id for the control |
Name |
The unique name for the text area |
OnServerChange |
The name of the function to be executed when the contents
of the textarea is
changed |
Rows |
The number of visible rows of the text area |
runat |
Specifies that the control is a server control. Must
be set to "server" |
Value |
The content of the textarea |
Example 1
In the following example we declare an HtmlTextarea
control and an HtmlGeneric control in an .aspx file (remember to embed the controls
inside an HtmlForm control). When the submit button is triggered, the submit subroutine is executed. The
submit subroutine sends the message "You wrote: " and the text the user wrote in
the text area to the span control:
<script runat="server">
Sub submit(sender As Object, e As EventArgs)
s1.InnerHtml = "<b>You wrote:</b> " & t1.Value
End Sub
</script>
<html>
<body>
<form runat="server">
What do you think of ASP.NET?<br />
<textarea id="t1" cols="35" rows="6" runat="server" />
<input type="submit" value="Submit" OnServerClick="submit"
runat="server" />
<br />
<span id="s1" runat="server" />
</form>
</body>
</html>
|
Jump to: Top of Page
or HOME or
Printer friendly page
Search W3Schools:
What Others Say About Us
Does the world know about us? Check out these places:
Dogpile
Alta Vista
MSN
Google
Excite
Lycos
Yahoo
Ask Jeeves
We Help You For Free. You Can Help Us!
W3Schools is for training only. We do not warrant its correctness or its fitness for use.
The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our
terms of use and
privacy policy.
Copyright 1999-2002 by Refsnes Data. All Rights Reserved
|