Is there any way to alter the passed object to an action-method before it actually enters/(gets passed to) the action-metod?.. For instance... By default I want the Index()-action-method to always take an argument of MyClass..
So.. if a user visit mydomain.com/AController/
The triggerd action-method should be
public ActionResult Index(MyClass arg)
{
return View();
}
Im not really sure of how to explain this.. but hopefully you get it.. What I actually want to do is the same thing that Umbraco does in thier MVC-project.. where they always pass-along a RenderModel-object, except that I want to have my own type not the RenderModel..
Thanks in advance!