1
我感兴趣的参考作用后 重定向和我希望它是类似于通用返回常规动作后法MVC中控制器
ActionResult action = new DashboardController().Index(3);
return action;
我想这样的代码
因为我使用POST 重定向到一个网页,我不能用这个
return RedirectToAction(actionName, controllerName);
public ActionResult generic(string Controller,string Action)
{
Assembly asm = Assembly.GetAssembly(typeof(MvcApplication));
var controlleractionlist = asm.GetTypes()
.Where(type => typeof(Controller).IsAssignableFrom(type));
return typeof(typeof(controlleractionlist).GetProperty(Controller))
.GetProperty(Action);
}
我提前为我的英语
我只是想只是通用的,我可以发送每一个不同的t控制器和不同的行动 –