uh oh. I overlooked something major!

  • Thread starter Thread starter djc
  • Start date Start date
D

djc

one of my database fields (MSDE 2000) is of datatype TEXT. This is a long
field were users will enter long descriptive text. On the data entry form
the users will of course put cariage returns and tabs ect.. to format what
they are entering. For example:

-----------------------------sample----------------------------
Please do the following:

1) some text here for the first thing
2) some text here for the second thing
3) some text here for the 3rd thing

I'm sure you get the point.
----------------------------------------------------------------

The problem is when I later display this data on a details page none of the
control characters (tabs, carriage returns) are used. It just displays like
this:
--------------------------sample--------------------------------
Please do the following:1) some text here for the first thing2) some text
here for the second thing3) some text here for the 3rd thing
I'm sure you get the point.
----------------------------------------------------------------

How can I make the items display with there control characters? I can see
when viewing the html generated by the page that these breaks and such are
there but of course all that 'whitespace' is ignored by html/browser? what
can I do? I'm using a repeater control to repeat all detail entries for a
specific issue ID in a simple issue tracking system. Do I need to use a
textbox? any other options?

any input is apprecated. Thanks.
 
You could try wrapping the content in a <pre> tag or converting the
characters to something that the browser understands like <br>.
 
thanks for the reply. The <pre> tag was almost the ticket for me. But
unfortunately when the data is initially entered it is entered into a text
box that automatically wraps the lines. So even though using the <pre> saved
the line breaks that are there from a user actually using a cariage return
the the data goes way for off to the right since its not being displayed
inside a control that will do this 'wrapping' again. Like a textbox would.
The only issue I have with using a textbox for this is that each of these
detail entries varies a lot in length. So unless I can make the textbox's
height automatically adjust to fit the content I would need to specify a
fixed height (or number of rows) and let the data scroll. And if I specify a
height of like 10 rows then the entries that only use 1 or 2 rows will be
wasting a lot of space.

1) Do you know If I can make a textboxes height auto grow to fit the
content? I would rather it not scroll and I have to accomodate 1 or 2 line
entries as well.

any other info is greatly appreciated. Thanks again for the reply. I didn't
know about the <pre> tag. I'm sure I will use that at some point.
 

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

Back
Top