Resize the TextBox dynamically according to text


<script type="text/javascript">
function setHeight(txtNote) {
txtNote.style.height = txtNote.scrollHeight + "px";
}
</script>

In the body :
<asp:TextBox ID="txtNote" runat= "server" TextMode="MultiLine"  onkeyup="setHeight(this);" onkeydown="setHeight(this);" />

Comments