-1

目标:
仅将 MVC 与 ASP.net Webform 一起使用。

问题陈述:
是否可以为 ASP.NET 网络表单使用概念 MVC(模型、视图等)?如果是,我该怎么做?有图片吗?

4

1 回答 1

1

There seems to be some confusion in the comments. If I understand you correctly, you are not trying to make Webforms work with the ASP.NET MVC technology. You want to use the MVC Pattern with a WebForms page.

If that's the case, then no. You can't use the MVC Pattern with a Webforms page (ie full page lifecycle, etc..). The WebForms model just doesn't work in a way that is consistent with an MVC design.

You can, however, use other patterns that are similar to MVC and try to achieve similar goals of separation of concerns. The most common of these is the MVP or Model View Presenter pattern.

http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter

http://msdn.microsoft.com/en-us/magazine/cc188690.aspx

于 2013-09-26T16:50:57.770 回答