Hi George,
When you display this in a textbox it should display fine. If you use a label you need to convert the line breaks with <br> or <p> tags. Here's a routine that I use for this:
/// <summary>
/// Fixes a plain text field for display as HTML by replacing carriage returns
/// with the appropriate br and p tags for breaks.
/// </summary>
/// <param name="String Text">Input string</param>
/// <returns>Fixed up string</returns>
public static string DisplayMemo(string HtmlText)
{
HtmlText = HtmlText.Replace("\r\n","\r");
HtmlText = HtmlText.Replace("\n","\r");
HtmlText = HtmlText.Replace("\r\r","<p>");
HtmlText = HtmlText.Replace("\r","<br>");
return HtmlText;
}
+++ Rick --
--
Rick Strahl
West Wind Technologies
http://www.west-wind.com/ http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
"Gmansky" <gm*****@starmd.net> wrote in message news:eO**************@TK2MSFTNGP11.phx.gbl...
I have a dataItem that is a text memo field. When I use
<%#container.DataItem('memoText')%>, it displays it with no line breaks.
Is there a function to convert the line breaks on the memo field?
Thanks,
George