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控制器和不同的行動 –