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
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")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With