I am trying to call MVC action with parameters on html button click. I want to know how can i pass the textbox value as parameter to that action. Following is the code which i am using:
<input type="button" value="Create" onclick="location.href='@Url.Action("Verify", "Login", new { username = "'document.getElementById('txtUsername').value'", password="admin" } )'" />
i want to know the correct method / syntax of how to pass that textbox value