Replacing linebreaks with <br>

  • Thread starter Thread starter Stefan Landgraf
  • Start date Start date
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
 
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
 
Back
Top