I am building a search view in asp.net MVC 2
So I have:
public ActionResult Search()
{
...
}
[HttpPost]
public ActionResult Search(string input, FormCollection formValues)
{
...
}
The problem is in the view there is a textbox and two buttons "Search" and "Clear Results".
Once entering the [HttpPost]
method how do I work out which button has been clicked ? (So I can change the search & display logic) - or does this have to be a link instead?