I want to use the HttpGet and HttpPost attributes for one action method. However, I have only seen examples where the attributes are used individually on separate action methods.
For example:
public ActionResult Index()
{
//Code...
return View();
}
[HttpPost]
public ActionResult Index(FormCollection form)
{
//Code...
return View();
}
I want to have something like this:
[HttpGet][HttpPost]
public ActionResult Index(FormCollection form)
{
//Code...
return View();
}
I remember having seen this done somewhere, but cannot remember where.