title: How do I store the value of a @Html.TextBox to a variable
body: <p>I'm a newbie to Razor and Asp.Net.  I'm mostly a Winforms developer.  I must say I don't like what I've been seeing in ASP, over complicated to say the least.  Anyways, I want to take the value from a @Html.TextBox and store it to a variable.  I've searched on here an can't find a solution.  There has to be a simple way of doing this.  </p>
  
  <p>I've been trying to pull the value out with Request.Froms but keeps crashing</p>
  
  <pre><code>        @Html.TextBox("test")
          @Html.TextBox("test2")
          @{
              var z = Request.Form["test"];
              var x = Request.Form["test2"];
           }
  </code></pre>
  
  <p>All I want is to store the inputted value to z and x.  Meaning if I input 2 into test and 3 in to test2 I want z = 2 and x = 3.</p>