I'm new to ASP.NET and am creating an MVC application. I have, in my controller a method that works as follows:
public ActionResult ShowClients(string proc)
{
--(proc)EXECUTA ALGUMA LOGICA AQUI
return View();
}
The logic of this method has already been tested and is working perfectly, the problem is that I need to pass this string "proc" to this controller through a form that is in the view (in case it would be the parameter that the user would type). So when the user filled out the textbox and clicked on the submit button the method would be called with what was written in the textbox. With the code below, I was able to send the parameter to the method but the problem is that in addition to the @ url.Action being a GET method, I also can not insert variables in it (at least not that I know of):
<form method="post">
<input type="text" id="NICK" name="proc" placeholder="Digite Nome ou CPF">
<input type="submit" onclick="parent.location='@Url.Action("ShowClients", "Clientes", new { proc = "SAUL DOM" })';return false;" value="Pesquisar" >
</form>
Is there any way to do this?