ASP.NET MVC不ViewState的回传和工作?
也许这是一个幼稚的问题。在我的理解,ASP.NET MVC无法与ViewState的回发和这是ASP.NET表单基础工作。这是否正确?
Perhaps this is a naive question. In my understanding, ASP.NET MVC cannot work with ViewState and Postback which is fundamentals of ASP.NET forms. Is that correct?
如果仅此而已,然后根据的ViewState&放所有的ASP.NET Web控件;回发不能在ASP.NET MVC中使用,对吧?
If that's it, then all ASP.NET Web Controls depending on ViewState & Postback cannot be used in ASP.NET MVC, right?
ASP.NET的服务器端控件与的WebForms,而不是MVC工作。 MVC不会在传统的ASP.NET意义上使用的控制(至少还)。
ASP.NET's server-side controls work with WebForms, not MVC. MVC doesn't use controls in the traditional ASP.NET sense (at least yet).
MVC模式是从WebForms的模式完全不同;没有更好或更坏,但非常不同。使用MVC使开发人员更接近生成的HTML,本质上更适合于单元测试,并提供用于填充的UI用户界面和code之间的关注强烈的分离。
The MVC model is quite different from the WebForms model; not better or worse, but very different. Using MVC puts the developer much closer to the generated HTML, lends itself more intrinsically to unit testing, and provides a strong separation of concerns between the UI and the code that populates that UI.
乍一看,特别是要强化ASP.NET退伍军人,MVC似乎是倒退了一大步(如果你已经被编码以后,ASP COM发展的愿景可能会在你的头上跳舞)。
At first glance, especially to hardened ASP.NET veterans, MVC can seem like a huge step backwards (if you've were coding then, visions of ASP COM development might dance in your head).
但给MVC一试。这是非常有趣,它的型号是颇为引人注目,一旦你习惯了它。
But give MVC a try. It is very interesting and its model is quite compelling once you get used to it.
在这里阅读更多:
http://quickstarts.asp.net/$p$pviews/mvc/mvc_HowToRenderFormUsingHtmlHelpers.htm
此外,检查出使用MVC这个有趣的博客引擎:
HTTP://www.$c$cplex.com/oxite
Also, check out this interesting blog engine that uses MVC: http://www.codeplex.com/oxite
最后,检查出罗布科纳的MVC店面项目:
http://wekeroad.com/category/mvc-storefront
Finally, check out Rob Conery's MVC storefront project: http://wekeroad.com/category/mvc-storefront