Introducing “Razor” – a new view engine for ASP.NET

One of the things my team has been working on has been a new view engine option for ASP.NET. ASP.NET MVC has always supported the concept of “view engines” – which are the pluggable modules that implement different template syntax options. The “default” view engine for ASP.NET MVC today uses the same .aspx/.ascx/.master file templates as ASP.NET Web Forms. The new view-engine option we’ve been working on is optimized around HTML generation using a code-focused templating approach. Design Goals We had several design goals in mind as we prototyped and evaluated “Razor”: Compact, Expressive, and Fluid: Razor minimizes the number of characters and keystrokes required in a file, and enables a fast, fluid coding workflow. We’ve spent the last few months building applications with it and doing lots of usability studies of it with a variety of volunteers (including several groups of non-.NET web developers). Choice and Flexibility Hello World Sample with Razor Building it with .ASPX Code Nuggets
HTML5 & CSS3 in Visual Studio 2010 SP1 - Web Development Tools @ Microsoft
Since the release of Visual Studio 2010 SP1 beta last month, there has been a lot of questions regarding the support for HTML5 and CSS3. Visual Studio 2010 was originally released without HTML5 support, so does SP1 finally add support for it? Yes, to some extent. The entire HTML5 specification isn’t supported but most of the new elements and attributes are. That means you get both intellisense and validation for HTML5 with SP1. Turn it on After installing SP1 you have to tell Visual Studio to start using the HTML5 schema. Or if you have the HTML Source Editing toolbar enabled, you can select it in the target schema dropdown. Intellisense support The new elements that are specific to HTML5 are shown in the intellisense list as you would expect. Even the new HTML5 specific attribute values for existing elements are shown. This error has been fixed and will be included in the final SP1. In SP1 there are a few improvements in the CSS3 support as well, though not as elaborate as with HTML5.
Nested layout pages in Razor
This post is for people using the Razor view engine in ASP.NET MVC3. Preamble In any reasonably sized website you will want to use layout pages for the common header and footer parts of HTML. Razor makes this easy and the syntax is elegant (especially when compared to the old webforms view engine). However, on more complex websites there is often a need to nest layouts. Consider a web application that has some common scripts and styles across all pages, but a number of "areas" that have their own HTML structure. Nested Layouts The top-level layout looks like a regular Razor layout. Note that this top-level layout defines where it's inner content will go (RenderBody) and also has an optional "scripts" section. For each area, we can now create a nested layout page. This nested layout inherits from the top-level layout. It also has to redefine the scripts section. A view in the public area will look like this: End Result
Home - BUILD | September 13 - 16, 2011 | Anaheim Convention Center
asp.net mvc3 razor documentation?
visual studio - Where can I find nice Dark ReSharper (with Color identifiers = on) Themes
MVC 3: Razor’s @: and <text> syntax
This is another in a series of posts I’m doing that cover some of the new ASP.NET MVC 3 features: In today’s post I’m going to discuss two useful syntactical features of the new Razor view-engine – the @: and <text> syntax support. Fluid Coding with Razor ASP.NET MVC 3 ships with a new view-engine option called “Razor” (in addition to the existing .aspx view engine). Razor minimizes the number of characters and keystrokes required when writing a view template, and enables a fast, fluid coding workflow. For example, the Razor snippet below can be used to iterate a list of products: When run, it generates output like: One of the techniques that Razor uses to implicitly identify when a code block ends is to look for tag/element content to denote the beginning of a content region. This particular technique – using tags to identify content blocks within code – is one of the key ingredients that makes Razor so clean and productive with scenarios involving HTML creation. Multiple Lines of Content
Blackstreet: Don't Leave Me
MVC 3: New @model keyword in Razor
Two weeks ago we shipped the ASP.NET MVC 3 Beta Release. It supports “go live” deployments, and includes a bunch of nice improvements/enhancements. You can see a summary of the new ASP.NET MVC 3 features in my beta announcement post. Also read my original ASP.NET MVC 3 Preview post to learn about other ASP.NET MVC 3 features that showed up with that initial preview release. This post is the first of several “mini-posts” I’m going to do that talk about a few of the new ASP.NET MVC 3 Beta features in more detail. Razor Basics ASP.NET MVC 3 ships with a new view-engine option called “Razor” (in addition to continuing to support/enhance the existing .aspx view engine). You can learn more about Razor, why we are introducing it, and the syntax it supports from my Introducing Razor blog post. Once you’ve read the Introducing Razor post, also read my ASP.NET MVC 3 Preview post and look over the ASP.NET MVC 3 Razor sample I included in it. New @model directive Summary Hope this helps, Scott
Samsung 46" LED-TV UE46D6515XXE (3D)
Ta steget in i interaktiv hemmaunderhållning med Samsung LED 6000: s Smart Hub. Det är det enklaste sättet att få ut mer av din TV. Nu kan du använda internet fullt ut genom TV: n med nya funktioner som Search All, Your Video och Web Browser. Funktionerna hjälper dig att hitta TV-relaterat innehåll och information online samtidigt som du kan dela med dig av filmer, foton och musik. 3D-hemmabio är inte komplett utan Samsungs 3D LED-TV Med ledande 3D-bildteknik levererar Samsung 3D LED-TV en oförglömlig bildupplevelse. Den ultimata mediahubben i TV:n Tack vare mängder med anslutningsmöjligheter kan du sköta all digital underhållning från ett och samma ställe. CMR 200 Upplev äkta rörelseskärpa med Samsungs Clear Motion Rate. Ultra Clear Panel Säg adjö till oskärpa. Digital Noise Filter Titta på analoga program med samma kristallklara skärpa som digitala sändningar med Samsungs Digital Noise Filter. Full HD 1080p Kom närmare verkligheten. Wide Color Enhancer Plus Se världens sanna färger.
Related:
Related: