title: ASP.NET MVC C# Razor Minification
body: <p>Does anybody have any idea about how to output minified HTML and JavaScript from the Razor engine while keeping custom coding styles?</p>
  
  <p>For example: i want the following code:</p>
  
  <pre><code>&lt;div
      @if (Model.Name != string.Empty)
          @:id="@Model.Name"
  &gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>To be outputted as <code>&lt;div id="DivId"&gt;&lt;/div&gt;</code> .</p>