title: "The 'div' element wasn't closed" is caused by @using (Html.BeginForm()) in my view. I'm 100% sure I'm closing it properly
body: <p>I get this error in my view:</p>
  
  <blockquote>
    <p>the 'div' element wasn't closed</p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/iSb1C.png" alt="">
  I have tried in the second way, but without success</p>
  
  <p>Error caused by second way:</p>
  
  <p><img src="https://i.stack.imgur.com/uhAH8.png" alt=""></p>
  
  <p><a href="https://i.stack.imgur.com/utJOk.png" rel="nofollow noreferrer">minimized but still doing the same</a></p>
  
  <pre><code>@using (Html.BeginForm("Index", null, FormMethod.Post, new { @class = "content", @id = "transferContent" }))
             {
              &lt;div class="container" style="margin-top:50px" id="einAusContainer"&gt;
                  &lt;h2&gt;hello&lt;/h2&gt;
              &lt;/div&gt;
             }
  </code></pre>
  
  <p>Now it's showing the red ~ under the @ sign in the beginning of the code</p>