title: Replace spaces in string, mvc razor
body: <p>I am very new to MVC and razor, but I am enjoying it so far.  There are one or two basics I am having trouble with so hopefully this will be a nice easy one for someone.</p>
  
  <p>I am making a new variable and replacing the white spaces. However, this doesn't appear to be working at all; the space that I am adding to the string myself remains.  I cannot simply use the underscore at this point as both <code>Address1</code> and <code>Postcode</code> may also contain spaces, so the replace is essential.</p>
  
  <pre><code>@{ 
      var mapAddress = Model.Address1 + ", " + Model.Postcode;
      mapAddress.Replace(" ", "_");
  }
  </code></pre>