Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7711509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:23:35+00:00 2026-06-01T01:23:35+00:00

I need to use a text-box (multiline) in my application. It need to grow

  • 0

I need to use a text-box (multiline) in my application. It need to grow as the user inputs text into it. I want that textbox to grow without any scrollbars. I tried allow=resize:null but it just prevents textbox from being stretched.All i want is a textbox as we see in facebook comment /share area which grows simply without any scrollbars on sides. I hope i have neatly explained it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T01:23:37+00:00Added an answer on June 1, 2026 at 1:23 am

    You can use something like this: (Source: Expandable or Auto-Resize TextBox Height by Colt Kwong)

        <asp:TextBox ID="txtMsg" runat="server"  TextMode="MultiLine" 
    style="overflow:hidden" onkeyup="AutoExpand(this, event)" Rows="2" />
    

    using this javascript:

        function AutoExpand(txtBox, event) 
    {
        if (event.keyCode == "13" || event.keyCode == "8") {
            var therows = 0
            var thetext = document.getElementById(txtBox.id).value;
            var newtext = thetext.split("\n");
            therows += newtext.length
    
            document.getElementById(txtBox.id).rows = therows;
            return false;
        }
    }
    

    Or if you like jquery you should take a look at the jQuery autoResize Plugin.

    A plugin for jQuery which changes the dimensions of input elements to
    suit the amount of data entered. It operates on textarea,
    input[type=text] and input[type=password] elements.

    Usage is as follows:

    $('textarea#foo').autoResize();
    

    You can pass options:

    $('textarea#foo').autoResize({
        maxHeight: 200,
        minHeight: 100
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need a regular expression that checks if the multiline textbox has been left
I have text box and what happens is that the user will click on
What is the best rich text box to use with ASP.NET 2.0? I need
I want to use datetime picker in 4 text box. JQuery datepicker for 4
need to add a downward facing arrow to a text box. decided to use
I need to be able to allow a user to enter Vietnamese text into
I need to use a datetime.strptime on the text which looks like follows. Some
I need to use C++ to read in text with spaces, followed by a
What encoding we need to use to save a file as text file(of type
This is for a multiline textbox on an asp.net site. I can use either

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.