From: Richard on
When using text boxes. how do you force another line when character spacing
reaches a certain point.
From: Ronx on
A text box is a single line. Full stop.

A text area will automatically wrap when the user types to the end of the
visible space - this does not, however, add a line feed.
To add a line feed after a preset number of characters, as I said in an
earlier post, you need server side scripting which parses the data, and adds
the line feed at the required intervals. Of course, this is complicated by
needing to account for spaces between words - and avoiding the line feed in
the middle of a word. What you want is a simple text editor - and those
possible, but are NOT easy to construct using web scripting languages
(asp.NET, asp, PHP) on the server, or using Javascript on the client browser
before the form is submitted..

Unless you *really* need a limited line length, the easiest way is to not do
anything for the form data, but deal with how it is rendered in whatever you
use it for.
For a guestbook type application - set the area the data is displayed in to
a limited size.

Perhaps you should explain what you are looking for, and how the results
will be used- an easy solution may be at the end of the processing chain
rather than at the beginning.
--
Ron Symonds
Microsoft MVP (Expression Web)
http://www.rxs-enterprises.org/fp

Reply only to group - emails will be deleted unread.



"Richard" <Richard(a)discussions.microsoft.com> wrote in message
news:A795EFB9-16C5-4586-9214-834CF31BD637(a)microsoft.com...
> When using text boxes. how do you force another line when character
> spacing
> reaches a certain point.