title: Razor engine, placing a close tag
body: <p>The razor engien have been bugging me a bit today. I have to set a variable lastAnime = c.Anime.Name but i just get the error</p>
  
  <blockquote>
    <p>No overload for method 'Write' takes 0 arguments</p>
  </blockquote>
  
  <pre><code> @{ var lastAnime = ""; }
  &lt;select name="character"&gt;
      &lt;option value=""&gt;All&lt;/option&gt;
      @foreach (var c in Model.Characters) {
          if (lastAnime != c.Anime.Name) {
              @{lastAnime = c.Anime.Name;}
              &lt;optgroup title="@c.Name"&gt;
          }
          if(lastAnime != "") {
              &lt;/optgroup&gt;
          }
          &lt;option value="@c.Id"&gt;@c.Name&lt;/option&gt;
      }
  &lt;/select&gt;
  </code></pre>
  
  <p>How can i do this?</p>