How To Display Formatted Text with ASP.NET ?

K

kbolster20

Hello,

I think there must be an obvious solution to this problem:

I have a file that I want to read into a web page when the page is
loaded. The file will contain formatted text (bold, italics, colored
text etc). The file will most likely be in in HTML format but that can
be changed if necessary.

What asp.net (or anything else i can use in an aspx page) control can I
load this file into to retain the formatting? I will also need to have
a vertical scrollbar as the text may be variable in length from day to
day but needs to take a up a static amount of space on the page.

Any help would be greatly appreciated. This seems very simple, so I
think I'm missing a major point here.

Thanks in advance,
Kathryn
 
2

23s

The file will most likely be in in HTML format

What asp.net (or anything else i can use in an aspx page) control can I
load this file into to retain the formatting?

You could try something along these lines (VB):

Dim myScrollingFileContents as New LiteralControl

myScrollingFileContents.Text = "<div overflow=scroll>" & strMyFileContents &
"</div>"

My overflow syntax might be a bit off, might wanna google that.
 
K

kbolster20

That seems to work on the code side, how would I get that control
(myScrollingFileContents) to show on the browser side aspx page? How
would I add it into the HTML code?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top