[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Formatting text in a text box control

Posted on 2009-04-22
5
Medium Priority
?
146 Views
Last Modified: 2012-05-06
I have about 3 paragraphs of text (its a disclaimer) to show, but I want to show maybe 3 lines and let them scroll through the rest.  The problem is when I put everything in a text box the formatting is messed up, mostly spacing and new lines where there is still room on the previous line.  What is the best way to handle this.  Is the textbox control the correct control.  This is a web page (aspx) we are talking about

thanks
0
Comment
Question by:mgmhicks
  • 3
  • 2
5 Comments
 
LVL 39

Expert Comment

by:abel
ID: 24207702
It sounds to me that the lines you want to show are already broken up with newlines in-between. Remove those newlines, except for the double newlines that separate the paragraphs. This will make the textbox do normal breaking of the lines.

Yes, it is common practice to use a multiline textbox for this on a web page.

If I misunderstood your question, can you please show two screenshots: one of what you have now and one of what you want it to look like (use Word or something like that).
0
 

Author Comment

by:mgmhicks
ID: 24207792
Here is the screen shot.  This text is in a note pad.  Looks good in there.  I copy and paste to textbox and you see what the textbox is beginning to look like.  I would just like about a 4 line textbox that scrolls with this verbage justified.
screenshot.jpg
0
 
LVL 39

Accepted Solution

by:
abel earned 2000 total points
ID: 24207869
Aha. Then it is like I said. Remove the line ends (except from the paragraphs). It will show in Visual Studio as three very long lines. The result will be that you have neatly formatted lines in your textbox in both the browser and the preview window.

Use CSS to format the textbox higher: height: 30px; (or you can use Height property of Textbox control).


0
 

Author Closing Comment

by:mgmhicks
ID: 31573427
Thank you
0
 
LVL 39

Expert Comment

by:abel
ID: 24207977
you're welcome :)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month17 days, 15 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question