title: Passing parameters to Controller on click of a button
body: <p>This might be a trivial question, me being a new bee :)
  Here is my View code</p>
  
  <pre><code>&lt;button type="button" id="btnLogin" onclick="location.href='&lt;%: Url.Action("Authenticate", "Login") %&gt;'" runat="server"&gt;&lt;/button&gt;
  </code></pre>
  
  <p>Here is my Controller code</p>
  
  <pre><code> public ActionResult Authenticate(string username,string password)
      {
          bool status = Login.Authenticate(username, password);
          return View("Status", status);
      }
  </code></pre>
  
  <p>I'm able to go to that controller but i'm unable to pass the parameters.Can any let me know what is the rite way to pass parameters to controller function.</p>
  
  <p><em><strong>Full View Code</em></strong> </p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;input type="text" id="txtUsername" runat="server" /&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;input type="text" id="txtPassword" runat="server" /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td colspan="2" align="center"&gt;
              &lt;button type="button" id="btnLogin" onclick="location.href='&lt;%: Url.Action("Authenticate", "Login") %&gt;'" runat="server"&gt;&lt;/button&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>