Question: I have an action in my HomeController (to keep it simple):

```
[HttpGet]
[HttpPost]
public ActionResult MyAction(MyOwnViewModel viewModel)
{
    // do some stuff with the viewmodel and return it to the view.
    // Selected values should be preserved inside the viewModel

    return View(viewModel);
}

```

And I want this action to be called whenever I go to the url /Home/MyAction. It complains that it can't find a MyAction method on the HomeController and I suspect it is because of the viewModel parameter.

Is there any way to work around this? I would expect the viewModel parameter to just be null.

Answer: 
The answer in this case is to remove one or both of the **[HttpGet]** and **[HttpPost]** action filters. 

For the edification of others, it is okay to have an action method that accepts a model parameter, with no alternative parameterless version of the method, as long as the model class has a public default constructor.

In such circumstances, the MVC ModelBinder will generate an empty instance of the model class for you.

Look into the **IModelBinder** interface for more information on custom model binding.
You can't have one `ActionResult` with two differing HTTP methods. You need to use overloads...

```
public ActionResult MyAction()
{
     return View(new MyViewModel());
}

```

And

```
[HttpPost]
public ActionResult MyAction(MyViewModel model)
{
     // Do your stuff...
     return View(model);
}

```