Should an ASP.NET masterpage get its data from the view?

前端 未结 3 514
天涯浪人
天涯浪人 2021-01-13 22:01

I\'ve been playing around with ASP.NET MVC with a site containing a Master Page.

I created an MVC user control called ProductThumbnailControl. The user c

3条回答
  •  猫巷女王i
    2021-01-13 22:51

    I would create a ShoppingCart Controller (or separate controllers for each concern) and render usercontrols that use them with RenderAction found in the Futures DLL that you can download from www.codeplex.com/asp.net. It is part of the ASP.NET MVC source code.

    Using a base controller or a 'site model' couples too many things together, creating a testing and maintanence nightmare.

提交回复
热议问题