title: Pass Value from Button back to C# Controller from ASP.NET MVC 3 Razor Page
body: <p>I have two buttons on my cshtml page - <code>Agree</code> and <code>Disagree</code> - how can I easily pass back there values to my Controller so I can make a decision to either take them to Homepage or Log them back out.</p>
  
  <p>So on my cshtml page I have...</p>
  
  <pre><code>    &lt;input type="button" name='Agree' value="I Agree"
                     onclick="location.href='@Url.Action("DoAccept", "Home")'" /&gt;
      &lt;input type="button" name='Delete' value="I Disagree"
                     onclick="location.href='@Url.Action("DoAccept", "Home")'" /&gt;
  </code></pre>
  
  <p>So In my Home Controller then I have a DoAccept method as below:</p>
  
  <pre><code>    public ActionResult DoAcceptTC()
      {
         //if( buttom clicked was Agree)
          return RedirectToAction(VIEW_HOMEPAGE);
         //else
        //return Logout page..  
      }
  </code></pre>
  
  <p>So My question is how can I easily get a value back to the controller method?</p>