<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Converting SQL Server newline character to HTML break &lt;br/&gt;</title>
	<atom:link href="http://www.castnerit.com/blog/?feed=rss2&#038;p=48" rel="self" type="application/rss+xml" />
	<link>http://www.castnerit.com/blog/2008/07/22/converting-newline-character-to/</link>
	<description>A technology blog for ASP.NET, SharePoint, and business technology</description>
	<lastBuildDate>Thu, 05 Aug 2010 21:36:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Harpreet Singh</title>
		<link>http://www.castnerit.com/blog/2008/07/22/converting-newline-character-to/comment-page-1/#comment-124</link>
		<dc:creator>Harpreet Singh</dc:creator>
		<pubDate>Thu, 05 Aug 2010 21:36:53 +0000</pubDate>
		<guid isPermaLink="false">#comment-124</guid>
		<description>this is the best post on this issue. I was looking for hours for this solution but never thing of using regular expression.

Good work. Keep it up</description>
		<content:encoded><![CDATA[<p>this is the best post on this issue. I was looking for hours for this solution but never thing of using regular expression.</p>
<p>Good work. Keep it up</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.castnerit.com/blog/2008/07/22/converting-newline-character-to/comment-page-1/#comment-41</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 30 Mar 2010 16:46:45 +0000</pubDate>
		<guid isPermaLink="false">#comment-41</guid>
		<description>Thank you for feedback! I updated the post</description>
		<content:encoded><![CDATA[<p>Thank you for feedback! I updated the post</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boaz</title>
		<link>http://www.castnerit.com/blog/2008/07/22/converting-newline-character-to/comment-page-1/#comment-40</link>
		<dc:creator>Boaz</dc:creator>
		<pubDate>Wed, 17 Mar 2010 22:13:27 +0000</pubDate>
		<guid isPermaLink="false">#comment-40</guid>
		<description>looks like the html text did not make it...like the break tag in the regEx.Replace statement... 
It should have been there after the &quot;   &quot;body&quot;),   &quot;

you get the idea...</description>
		<content:encoded><![CDATA[<p>looks like the html text did not make it&#8230;like the break tag in the regEx.Replace statement&#8230;<br />
It should have been there after the &#8221;   &#8220;body&#8221;),   &#8221;</p>
<p>you get the idea&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boaz</title>
		<link>http://www.castnerit.com/blog/2008/07/22/converting-newline-character-to/comment-page-1/#comment-39</link>
		<dc:creator>Boaz</dc:creator>
		<pubDate>Wed, 17 Mar 2010 22:10:38 +0000</pubDate>
		<guid isPermaLink="false">#comment-39</guid>
		<description>Good post. While building a commenting feature for a website I&#039;m working on, I needed to convert &quot;\n&quot; to  as well.

I found another way to do this.
Here&#039;s what I did - it is in C#:

I am using a repeater control which displays the comments. 
In my page class, I created a RegEx variable like so:

protected static Regex regEx = new Regex(&quot;\n&quot;);

protected void Page_Load(object sender, EventArgs e)
   {
...
   }      

Then, within my repeater control&#039;s  section, I included this:


&lt;%# regEx.Replace((string)DataBinder.Eval(Container.DataItem, &quot;body&quot;), &quot;&quot;) %&gt;


&quot;body&quot; is the column name returned by my database procedure for the comment text.

Both ways seem to work fine.
My way has less code, though.

Thanks for the post!</description>
		<content:encoded><![CDATA[<p>Good post. While building a commenting feature for a website I&#8217;m working on, I needed to convert &#8220;\n&#8221; to  as well.</p>
<p>I found another way to do this.<br />
Here&#8217;s what I did &#8211; it is in C#:</p>
<p>I am using a repeater control which displays the comments.<br />
In my page class, I created a RegEx variable like so:</p>
<p>protected static Regex regEx = new Regex(&#8220;\n&#8221;);</p>
<p>protected void Page_Load(object sender, EventArgs e)<br />
   {<br />
&#8230;<br />
   }      </p>
<p>Then, within my repeater control&#8217;s  section, I included this:</p>
<p>&lt;%# regEx.Replace((string)DataBinder.Eval(Container.DataItem, &quot;body&quot;), &quot;&#8221;) %&gt;</p>
<p>&#8220;body&#8221; is the column name returned by my database procedure for the comment text.</p>
<p>Both ways seem to work fine.<br />
My way has less code, though.</p>
<p>Thanks for the post!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
