开发者

Is there a strongly typed RedirectToAction in ASP.NET MVC 2?

I wish to do something like this:

开发者_StackOverflow中文版return RedirectToAction<SomeController>(c => Index(someparameter));  

How to do this ?

Thanks, D.


That is a feature of the MvcContrib project.

Just download MvcContrib from here, add a reference to MvcContrib.dll in your project and then you should be able to do exactly what you want.


is there something wrong with?

return RedirectToAction("Action", "Controller", new { parameter1 = value, param2 = value2 });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜