Replacing linebreaks with <br>

S

Stefan Landgraf

Hi there!

How can i replace linebreaks with <br> in datalist output ?
Is there a way i can do that in the aspx page itself without having
to go through the code page?

Thanks
Stefan
 
S

S. Justin Gengo

Stefan,

Normal functions can be called directly from within your databind
expressions so you could do it something like this. I haven't tested this
code so it might have to be modified slightly but I'm pretty confident it
will work as is:

<%# CType(DataBinder.Eval(Container,
"DataItem.MyItem"), String).Replace(VbCrlf, "<br>") %>

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 

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,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top