相关疑难解决方法(0)

将查询字符串传递给RedirectToRouteResult(在控制器和操作旁边)

我有以下代码:

var routeDictionary = new RouteValueDictionary {{"action", "Login"}, {"controller", "Persons"}};
filterContext.Result = new RedirectToRouteResult(routeDictionary);
Run Code Online (Sandbox Code Playgroud)

那会产生" /Persons/Login"

如何将aditional查询字符串传递给前面的代码?所以它产生" /Persons/Login/?someQuerystring=someValue"

redirecttoroute asp.net-mvc-routing asp.net-mvc-4

15
推荐指数
1
解决办法
1万
查看次数