IntroductionEhsan was telling me about the litte, simple and useful control. All of us already seen that control in facebook chatting window. that textboox automatically bacome bigger according to the text written in the textbox. Here is the demo of that JQuery http://www.aclevercookie.com/demos/autogrow_textarea.html
I have tested that in asp.net TextBox it works. Here is my code in asp.net for auto growing textbox. Next you have to download JQuery and JQuery Auto Grow to use it. CodeLinesJust compose this code or copy paste in your html page to automatically grow your textbox which is marked class as "Expanding" <script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" src="jquery.autogrow.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.expanding').autogrow();
});
<style type="text/css">
.expanding {line-height: 18px;}
</style>
<asp:TextBox ID="myTxt" runat="server" CssClass="expanding" AutoPostBack="false" TextMode="MultiLine"></asp:TextBox> I hope this is help to you all. |