title: asp.net mvc razor - how to break out of C#
body: <p>If I'm working on a view in Razor, and I'm currently in a code block and want to output something, how do I do this? To illustrate my question, I'm using <code>echo</code> from PHP below:</p>
  
  <pre><code>&lt;p&gt;
    @if (Model.NumberOfWidgets &gt; 100)
    {
      echo(Model.NumberOfWidgets);
    }
    else
    {
      echo("There are loads of widgets.");
    }
  &lt;/p&gt;
  </code></pre>
  
  <p>So I'm using <code>echo</code> where I want to tell Razor that I'm not doing C# anymore, I'm meaning this should be written to the output. How do I do this?</p>
  
  <p>Edit: I tried Response.Write, but that gets written before the view markup, at the top of the page!</p>