开发者

Reuse views and controller logic in MVC3

in my MVC3 based application I often need to reuse the same functionality in different views.

Example: One view to search for users. Another view to show the search results and enable the user to select one or more of the returned records. At the end those records have to be passed to the original view/controller开发者_运维技巧.

How can I use (if at all) RenderAction and a, let's say, UserAccountSelectionController to build a reusable set of controller(s) and views? How would my reusable controller "know" where to pass the selected user models to? Is there a different approach to create reusable components the MVC3 way?

Your help is greatly appreciated.

Regards, Kevin

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜