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

  • Home
  • SEARCH
  • 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 8060597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:02:44+00:00 2026-06-05T10:02:44+00:00

I have a textbox as follows: <asp:TextBox ID=TextBox1 runat=server Width=100px Rows=3 ReadOnly=true BorderStyle=None BorderWidth=0

  • 0

I have a textbox as follows:

    <asp:TextBox ID="TextBox1" runat="server" Width="100px" Rows="3" ReadOnly="true"
 BorderStyle="None" BorderWidth="0" TextMode="MultiLine" Text='<%# Eval("Notes") %>'
 BackColor="#222222" ForeColor="White"></asp:TextBox>

How can I make it so that the vertical scrollbar is not displayed when the textbox is either empty or it doesn’t need to scroll because the text fits in the 3 lines?

  • 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-05T10:02:45+00:00Added an answer on June 5, 2026 at 10:02 am

    You can do this with CSS by specifying overflow:auto;. You can manually add this attribute to the CssStyleCollection at TextBox1.Style in your page’s code-behind, or you can apply a CssClass value declaratively and define the css class in an external stylesheet.

    Here is some documentation on CSS overflow : http://www.quirksmode.org/css/overflow.html

    Here is some documentation on the TextBox.Style property: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.style

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a single asp:textbox declared as follows: <asp:TextBox ID=textBox1 class=myTB runat=server TextMode=MultiLine Font-Names=Calibri
I have a textbox and an image button as follows <asp:TextBox ID=myText runat=server></asp:TextBox> <asp:ImageButton
Hey so I have a gridview as follows <asp:GridView ID=productListTable runat=server DataSourceID=srcProductListPerCustomer AutoGenerateColumns=False AlternatingRowStyle-CssClass=tr_dark
I have a custom validator attached to a textbox control as follows <td align=center
I have asp:TextBox to keep a value of money, i.e. '1000', '1000,0' and '1000,00'
I have an ASP textbox control where I need to execute some javascript function
I have a class that is bound to GUI elements as follows: <TextBox Style={StaticResource
I use the following code to display a tooltip <asp:GridView ID=GridView1 runat=server AutoGenerateColumns=False DataKeyNames=ID
I have an asp.net regularexpressionvalidator that I need to match on a textbox. If
I have a view that displays a textbox as follows: @Html.TextBoxFor(m => m.CodeGuest, new

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.