How to pass parameter name of query string with dot in RedirectToAction

I am trying to pass a query string parameter from one controller to another using the RedirectToAction method.

However, my parameter name is something like "abc.Key", but I cannot specify such a value for RedirectToaction, as it gives me an error.

My RedirectToAction now looks like this:

return RedirectToAction("Pending", "SimpleController", 
    new { area = "Area1", Activities.ActivityGroupKey=qstring });

I searched a lot to understand how this can be done, but not bear fruit.

+4
source share
1 answer

I decided to use RouteValueDictionaryto solve my problem

Here is how I did it:

 return RedirectToAction("Pending", "SimpleController", new RouteValueDictionary{
    { "area","Area1" },
    { "Activities.ActivityGroupKey",qstring}
    } );
+3
source

All Articles