title: Make ASP.Net generate cleaner HTML source code?
body: <p>When I view the HTML source code for a page generated by razor markup it is displayed on a single line, this make it hard to dig through the source code to try and debug. Is there a way to make the razor output cleaner to read?</p>
  
  <p>Razor Code:</p>
  
  <pre><code>@using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data", @class = "Form" }))
  {
      @Html.AntiForgeryToken()
      @Html.ValidationSummary(false)
      @Html.HiddenFor(m =&gt; m.ID)
      @Html.HiddenFor(m =&gt; m.LogoFileID)
      @Html.HiddenFor(m =&gt; m.BannerFileID)
  }
  </code></pre>
  
  <p>Normal Output code:</p>
  
  <pre><code>&lt;form action="/Admin/SectionData/EditSection" class="Form" enctype="multipart/form-data" method="post"&gt;&lt;input name="__RequestVerificationToken" type="hidden" value="vtuiL8hTRJqtVcjPB-FJzL3e_4Tq3YnaH6kJVVBjzg5v4tlNt8_-Nb6H3tdRRv2SQXDsv4kJfZI-O2gmoAV_h4HcFaBArI4xSn4iFS0u0Cc1" /&gt;&lt;div class="validation-summary-valid" data-valmsg-summary="true"&gt;&lt;ul&gt;&lt;li style="display:none"&gt;&lt;/li&gt;
  </code></pre>
  
  <p></p>
  
  <p>Output I would like:</p>
  
  <pre><code>&lt;form action="/Admin/SectionData/EditSection" class="Form" enctype="multipart/form-data" method="post"&gt;
      &lt;input name="__RequestVerificationToken" type="hidden" value="vtuiL8hTRJqtVcjPB-FJzL3e_4Tq3YnaH6kJVVBjzg5v4tlNt8_-Nb6H3tdRRv2SQXDsv4kJfZI-O2gmoAV_h4HcFaBArI4xSn4iFS0u0Cc1" /&gt;
      &lt;div class="validation-summary-valid" data-valmsg-summary="true"&gt;
          &lt;ul&gt;
              &lt;li style="display:none"&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;input data-val="true" data-val-number="The field ID must be a number." data-val-required="The ID field is required." id="ID" name="ID" type="hidden" value="110" /&gt;
      &lt;input data-val="true" data-val-number="The field LogoFileID must be a number." id="LogoFileID" name="LogoFileID" type="hidden" value="" /&gt;
      &lt;input data-val="true" data-val-number="The field BannerFileID must be a number." id="BannerFileID" name="BannerFileID" type="hidden" value="" /&gt;
  </code></pre>