In开发者_运维百科 Asp.Net 1.0/2.0/3.0 (non-MVC) I used to be able to change HTML markup whilst debugging, hit CTRL-S and then refresh my page to see the difference.
Can I do the same with Asp.Net MVC 2.0 using partial views or do I need to recompile the app each time?
The default view engine for MVC uses the same WebForms technology that vanilla ASP.NET does. You can do the same for ASP.NET MVC, when the runtime detects the files have changed, the views are recompiled.
Yes, I do this while debugging, and have never had problems.
No you're fine, I do it :-) If you are just changing markup and javascript a Ctrl+S and refresh will be fine. If you start changing c#/vb.net thats when you need to re-compile.
精彩评论