Introducing ASP.NET MVC 3 (Preview 1)
page 5 of 12
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 41269/ 196

Other Improvements in the Future

Three other enhancements we are working to enable in a future preview refresh are:

The ability to use a @model statement at the top of a “Razor” file instead of having to explicitly inherit from a base class.  This reduces the code and simplifies it.  

The ability to specify a default LayoutPage for the site to avoid having to explicitly set it within each view template.  This further reduces the code within the view template, and makes your code more DRY.

The ability to unit-test individual “Razor” template files without having to run the application or launch a web-server.

With these first two changes the above Browse template will be able to be written as simply:

imageThe above template syntax will be supported in a future preview refresh.  Full colorization and code-intellisense will be provided within the editor.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-10-04 4:16:51 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search