views:

82

answers:

1

I have a controller method that looks like this:

[AcceptGet]
public ActionResult Index(SecurityMatrixIndexViewModel model)
{
    if (model == null)  
        model = CreateIndexViewModel();

    return View(model);
}

In another controller method, I am redirecting to this Index action. I have an action filter attribute that takes a model object out of TempData and assigns it to filterContext.ActionParameters["model"], which will pass that object into Index() as the "model" parameter. The problem is that when I add the object in ActionParameters, it also puts "?model=MyProject.SecurityMatrixIndexViewModel" on the URL as the query string. Do you know how I can set something in ActionParameters without it becoming part of the query string?

Jon

+1  A: 

I don't think that is possible during a GET - since the request data is relayed via querystring.

Johannes Setiabudi