Reputation: 16022
When I attempt to add either parameters or query string values to the context inside an action filter, an exception gets raised to say that the collection is read only.
I would like to add values to the 'outgoing' url when it is created.
filterContext.ActionParameters.Add("test", "test");
I need these values passed on to the query string, or in the request parameters. Thanks
Upvotes: 9
Views: 6298
Reputation: 1919
HttpContext.Request.Params is read only. It's reflects the incoming request.
Consider using HttpContext.Items to save our own objects/values
filterContext.HttpContext.Items.Add("test","test")
Upvotes: 8