I have two actions in the same name (the normal LongTailSearchBox is showing drop list of the categories, and the HttpPost make the search page (if not exists) and the\n redirect to the search page
public ActionResult LongTailSearchBox()
{
return View();
}
And the httpPost of the action
[HttpPost]
public ActionResult LongTailSearchBox(string cat1, string cat2, string cat3, string cat4)
{
return RedirectToAction("LongTailSearchResult", "LongTailSearch", new { name = _url });
}
when I click on the login button (another form) it's return http post of-course..
so the HttpPost LongTailSearchBox is start too when the page is loading (I want it to start only if the someone click on the button of the Search and not any button that make httpPost..)
how to do it??
Update:
when I change the name of one of those actions is work like a charm, but I want them in the same name
and the login forsm of the html are
<form method="post" action="/LongTailSearch/LongTailSearchBox" novalidate="novalidate">
and
<form method="post" action="/login" novalidate="novalidate">