title: How can I put text from a multi-line text box into one string?
body: <p>I'm faced with a bit of an issue. The scenario is that I have a multi-line text box and I want to put all that text into one single string, <strong>without</strong> any new lines in it. This is what I have at the moment:            </p>
  
  <pre><code>string[] values = tbxValueList.Text.Split('\n');                
              foreach (string value in values)
              {
                  if (value != "" &amp;&amp; value != " " &amp;&amp; value != null &amp;&amp; value != "|")
                  {
                      valueList += value;
                  }
              }
  </code></pre>
  
  <p>The problem is that no matter what I try and what I do, there is always a new line (at least I think?) in my string, so instead of getting:</p>
  
  <p>"valuevaluevalue" </p>
  
  <p>I get:</p>
  
  <p>"value<br>
  value<br>
  value".</p>
  
  <p>I've even tried to replace with <code>string.Replace</code> and <code>regex.Replace</code>, but alas to no avail. Please advise.</p>
  
  <p>Yours sincerely,<br>
  Kevin van Zanten</p>