title: How to get/handle POST data in ASP.NET MVC 4 Razor?
body: <p>I have a problem with getting/handling <strong>POST</strong> data from <code>&lt;form&gt;</code> in ASP.NET MVC 4 Razor project.</p>
  
  <p>What have I done?</p>
  
  <ul>
  <li>defined such a method in <strong>Controller</strong>: <a href="http://ideone.com/dMhlVV" rel="nofollow noreferrer">http://ideone.com/dMhlVV</a></li>
  <li>defined such a markup for <code>@section</code> <a href="http://ideone.com/Wyx8vQ" rel="nofollow noreferrer">http://ideone.com/Wyx8vQ</a></li>
  </ul>
  
  <p>Don't argue at my code, I'm only testing ASP.NET MVC 4 features.</p>
  
  <p>As you can see in the controller's code, I've done also a <strong>Model</strong> for user info:</p>
  
  <pre><code>public class AuthForm
  {
      public string Login { get; set; }
      public string Password { get; set; }
  }
  </code></pre>
  
  <p>I thought, that ASP.NET if the model is correct will automatically parse data into the model, but mistaken.</p>
  
  <p>Then I tried to use <code>.Request["name"]</code>, but (inputs weren't empty):</p>
  
  <p><img src="https://i.stack.imgur.com/mKPoD.png" alt="enter image description here"></p>
  
  <p>Also I've tried to use such <strong>Attributes</strong>:</p>
  
  <ul>
  <li><code>[HttpPost]</code></li>
  <li><code>[AcceptVerbs(HttpVerbs.Post)]</code></li>
  </ul>
  
  <p>But also no success!</p>
  
  <p>What did I wrong? Please, help me to fix my issues.</p>
  
  <p>Thanks</p>