<p>I have this in a page :</p>

<pre><code>&lt;textarea id="taEditableContent" runat="server" rows="5"&gt;&lt;/textarea&gt;
&lt;ajaxToolkit:DynamicPopulateExtender ID="dpeEditPopulate" runat="server" TargetControlID="taEditableContent"
        ClearContentsDuringUpdate="true" PopulateTriggerControlID="hLink" ServicePath="/Content.asmx"
        ServiceMethod="EditContent" ContextKey='&lt;%=ContextKey %&gt;' /&gt;
</code></pre>

<p>Basically, a DynamicPopulateExtender that fills the contents of a textarea from a webservice. Problem is, no matter how I return the line breaks, the text in the text area will have no line feeds.</p>

<p>If I return the newlines as "br/" the entire text area remains empty. If I return new lines as "/r/n" , I get all the text as one continous line.  The webservice returns the string correctly:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;string xmlns="http://rprealm.com/"&gt;First line


Third line
Fourth line&lt;/string&gt;
</code></pre>

<p>But what I get in the text area is :</p>

<pre><code>First line Third line Fourth line
</code></pre>

[{'answer_id': 60490, 'author': 'Ricky Supit', 'author_id': 4191, 'author_profile': 'https://Stackoverflow.com/users/4191', 'pm_score': 0, 'selected': False, 'text': '<p>Try to add the following style on textarea: <strong>style="white-space: pre"</strong></p>\n'}, {'answer_id': 321353, 'author': 'csgero', 'author_id': 21764, 'author_profile': 'https://Stackoverflow.com/users/21764', 'pm_score': 1, 'selected': False, 'text': '<p>The problem is that the white space is ignored by default when the XML is processed. Try to add the <code>xml:space="preserve"</code> attribute to the string element. You\'ll also need to define the xml prefix as <code>xmlns:xml="http://www.w3.org/XML/1998/namespace"</code>.</p>\n'}]
['https://Stackoverflow.com/questions/60456', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3263/']