p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 2.0 Basics (http://p2p.wrox.com/forumdisplay.php?f=136)
-   -   TextBox for Email body (http://p2p.wrox.com/showthread.php?t=65278)

snufse January 15th, 2008 04:17 PM

TextBox for Email body
 
I am using a text box for email body. I have set the Textmode = MultiLine which allows me to enter multiple lines. Once I do this it automatically shows a scroll bar. Is there a way to have multiline without scroll bar or use another control?


planoie January 15th, 2008 06:37 PM

How then does the user scroll to lines that are not visible without a scroll bar?

-Peter

snufse January 16th, 2008 09:16 AM

I have limited the textbox to 10 lines


planoie January 16th, 2008 11:19 AM

Setting a multiline textbox line height does not limit what a user can enter. This forum's quick reply textbox is 7 lines high but you can enter a post of practically unlimited length (limited only by the database).

-Peter

dparsons January 16th, 2008 11:28 AM

As Peter has said, the number of lines is insignificant because once the user gets to about the 9th line in your textbox, the scrollbars will become enabled. If you are seriously trying to avoid this, set the MaxLength attribute of your textbox so that the user can never go beyond X point where the scrollbar becomes enabled.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========

planoie January 16th, 2008 11:36 AM

Quote:

quote:Originally posted by dparsons
 set the MaxLength attribute of your textbox
This is a good idea, however it does not work natively. The TEXTAREA HTML element does not support max length. See this link for more:

http://www.google.com/search?q=maxlength+textarea

-Peter

dparsons January 16th, 2008 12:01 PM

Good call Peter.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========


All times are GMT -4. The time now is 08:01 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.