开发者

Why can't Visual Studio preview MVC Razor View (.cshtml) pages similar to asp/aspx pages?

开发者 https://www.devze.com 2023-03-09 21:34 出处:网络
I enjoy working w开发者_如何转开发ith ASP.NET MVC 3 using the Razor view engine, but am embarrassed to admit that not having the ability to preview the pages (.cshtml) in the Visual Studio designer ne

I enjoy working w开发者_如何转开发ith ASP.NET MVC 3 using the Razor view engine, but am embarrassed to admit that not having the ability to preview the pages (.cshtml) in the Visual Studio designer negatively affects my productivity.

Is there a fundamental reason why Visual Studio won't preview Razor pages or is it simply a matter of Razor being relatively new (and released out of band), in which case we might expect preview in Visual Studio 2012?


It is indeed just a case of Razor being so new. No doubt preview will work with Razor in a future version (who knows, perhaps a service pack to 2010 will add this). However, as @marcind points out, this is speculation on my side...


Because there is no designer for it. You can preview it by running it.

I disagree about the productivity. In the past, with the ASPX designer, my markup was often destroyed (maybe it's better now)

Nobody knows if a designer will be there in the future. But according to this page there is a workaround available.

0

精彩评论

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