How To Display Formatted Text with ASP.NET ?

  • Thread starter Thread starter kbolster20
  • Start date Start date
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
 
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.
 
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!
 
Back
Top