title: How to keep line breaks in SQL Server using ASP.NET and C#?
body: <p>I have a multiline text box. User will give brief details in that text box. </p>
  
  <p>Like this:</p>
  
  <p><a href="https://i.stack.imgur.com/Fhlse.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fhlse.png" alt="user entering data in multiline textbox"></a></p>
  
  <p>After I saved this in SQL Server and retrieve it again, it is showing like the following screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/ZMpOK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZMpOK.png" alt="without line break"></a></p>
  
  <p>What can I do to keep the line breaks? Do I need to encrypt something before I save the data in SQL Server?</p>
  
  <p>Thanks.</p>
  
  <p>This is my code:</p>
  
  <pre><code>&lt;div id="Description_id" runat="server"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>C# code:</p>
  
  <pre><code>string description = rd["job_description"].ToString();
  Description_id.InnerText = description.Replace("\r\n", "&lt;br/&gt;");
  </code></pre>