Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show string variable to pure HTML

Status
Not open for further replies.

ggeorgiou01

Programmer
Apr 11, 2005
60
GB
Hi all,

I have a form with a description field on it. This description field is a "ASP textbox", and it saves away into the database with a data type of "TEXT".

My problem is:

for example if i was to enter the following
___________________________________
hello

I want this to be on a new line.
___________________________________

when i come to actually displaying my results from the database into a repeater using the following code:

<%# DataBinder.Eval(Container, "DataItem.Description") %>

it displays the results as this:
___________________________________
hello I want this to be on a new line.
___________________________________

How do i keep the carriage returns ? is this possible ?
 
Yes, it is. Use the Replace function and replace the carriage returns with <br/> tags.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top