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 5842911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:04:51+00:00 2026-05-22T12:04:51+00:00

Im using Asp.Net and VB on Visual Studio 2010 Hi, i am using a

  • 0

Im using Asp.Net and VB on Visual Studio 2010

Hi, i am using a System.Web.UI.WebControls.TextBox with the wrap property set to "true", my problem is that when it wraps a word, it moves the whole word to the next line, what i want to accomplish is for the textbox to wrap, but not move the whole word, just move to the new line when the text reaches the right side of the textbox.

Example, imagine a textbox 10 chars wide.

This is what happens:

0123456789  
i am a  
textbox 

This is what i need:

0123456789  
i am a tex  
tbox

But if i set the wrapping to false, it just will keep expanding the width of the textbox on the same line.

I was thinking of setting the wrap to false, and use the onTextChanged event to check the length of the text and manually trigger the new line. is there any easier way to acomplish this?

Thanks a lot!

  • 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-05-22T12:04:52+00:00Added an answer on May 22, 2026 at 12:04 pm

    This is a web browser implementation issue rather than something that can be accomplished with ASP.NET.

    The only way to control that, theoretically, would be to run JavaScript on the client end, but the route would require some heroics. You’d need to

    1. Have the JS calculate the length of the text entered
    2. Have the JS keep the original value of the text in a hidden INPUT field with some sort of line separator (i.e., “i am a tex<LINEBREAK>tbox“), that way you can discern real linebreaks from the user with the linebreaks that the JS puts in to chop off the end of the line
    3. On submitting the form, don’t use what’s in the actual textbox but rather what’s in the hidden INPUT field, with the <LINEBREAK>s replaced with empty strings.

    But all of the above would require an enormous amount of effort, lots of testing across the various browsers, and breaks some of the built-in ASP.NET stuff (i.e., not using the contents of a textbox but rather a client side INPUT).

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

Sidebar

Related Questions

I'm currently using Visual Studio 2010 and have created a 'ASP.NET MVC 3 Web
I am using C# visual studio 2010 to develop an ASP.NET website. I dynamically
I am using ASP.NET MVC 2 with Visual Studio 2010. A lot of my
Using ASP.NET MVC 3.0 with Visual Studio 2010 (Pre-SP1 and with SP1) and ASP.NET
On Visual Studio.NET 2010/localhost, an ASP.NET page developed with Devexpress editor and textbox controls
Can I develop asp.net 3.5/2.0 projects using Visual Studio 2010? Or I will be
Using asp.net 3.5 Gridview control, visual studio 2008. I have played with all the
Applications I am using: Visual Studio 2008 (C#/ASP.NET) Visual Source Safe 8.0 IIS 5.1
We do ASP.NET Development using Visual Studio. A discussion point we've just had is
We develop asp.net webforms using visual studio 2008. For multilingual support, we translate all

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.