<html>
<head>
<title>Setting and Retrieving Values from a MultiLine TextBox Control</title>
<link rel="stylesheet" href="/shared/netdemos.css">
<script language="C#" runat="server">
void txtChangedHandler ( object src, EventArgs e ) {
msg.InnerHtml = "You wrote: <p>" + myTextBox.Text;
}
</script>
</head>
<body>
<!-- #include virtual="~/shared/top.inc -->
<div class="header"><h2>Setting and Retrieving Values from a MultiLine TextBox Control</h2></div>
<!-- #include virtual="~/shared/viewsrc_top.inc" -->
<hr size=1 width=92%>
<center>
<form runat="server">
<p><b>Please add your comments then tab out when done</b>.</p>
<asp:textbox runat=server
id="myTextBox"
textmode="MultiLine"
backcolor="ivory"
columns=30 rows=5
text="The multiline textbox automatically provides scrollbars to accommodate varying amounts of text. This control is useful when we need to save form space. This is by the way the control that is used on most Web-based email programs and in bulletin boards and discussion forums. There is practically no limit to how much content we can place in the scrollable textbox. But also bear in mind not to give your users a hard time by letting them scroll all the way down or to the right only to find out that there really is nothing else in here but just this example nonsense."
onTextChanged="txtChangedHandler"
autopostback />
<p><span id="msg" runat="server" />
</form>
</center>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>