Category Archives: ASP.NET

ASP.NET MVC Razor

The new ASP.NET MVC Razor view engine is pretty cool. 🙂 Here are some examples: Namespaces: @using MyProject.Entities Define model type: @using MyProject.Entities @model User Create functions: @functions { public string GetSomething(User usr) { return usr.Name; } } Templating: // In your template <html> … @RenderSection(“MyContent”, true) // true = required <br /> @RenderSection(“MyFooter”, false)… Read More »