title: URL as a concatenated string in ASP.NET MVC View
body: <p>I am trying to create a custom url which is within a loop so that through each loop the produced url is different. The code looks like this:</p>
  
  <pre><code>@foreach (var car in Model)
          {
            &lt;div class="container"&gt;
              @{string country = Html.DisplayFor(modelCar =&gt; car.Country).ToString()}
              @{string mapUrl = "https://maps.googleapis.com/maps/api/staticmap?zoom=14&amp;size=150x120&amp;key=[insertkey]&amp;center="
  + country}
              &lt;img src=@mapUrl /&gt;
            &lt;/div&gt;
          }
  </code></pre>
  
  <p>The problem is the line where I define <code>mapUrl</code>renders an error. What is the problem with this code? </p>
  
  <p>Thanks in advance.</p>