Sunday, August 15, 2010 from DigiMortal
Today I tried out ASP.NET MVC HTML5 Helpers Toolkit by Dean Hume. Although browsers today support HTML5 partially it is time to start playing with it. As soon as HTML5 gets common standard in web you should be able to react fast. In this posting I will introduce you HTML5 Helpers Toolkit and some HTML5 field types. HTML5 Helpers Toolkit is easy to install. Just download the package, unpack it and reference the DLL you found from package. That’s all. You don’t have to do anything more. If your...
Sunday, August 15, 2010 from Mads Kristensen
In part 1 of this series, we looked at some tricks to optimize the performance of any website running in IIS 7 by only modifying the web.config. In this part we will focus on handling browser caching issues and optimize the number of JavaScript and CSS files loaded from an ASP.NET website. NB! All t ...
Saturday, August 14, 2010 from DigiMortal
ASP.NET MVC 3 supports global action filters. Global action filters are applied to all actions in web application. By example, you can use global action filters for common security checks. In this posting I will show you how to write dummy action filter, register it as global and test it. Creating action filter Let’s start with our primitive action filter that is able in some cases ruin page layout for IE. Am I evil? Yes, I am! But I want this example to work on IIS and Cassini both so let’s...
Saturday, August 14, 2010 from DigiMortal
ASP.NET MVC 3 brings us new view engine called Razor. Razor view engine was made available with WebMatrix first beta. Razor brings us new and very short syntax for writing views. In this posting I will introduce you shortly ASP.NET MVC Razor view engine. New ASP.NET MVC project type There is new ASP.NET MVC project type for Razor projects so you can start new application with Razor support already there. The other options are project with ASPX based views and empty ASP.NET MVC project. As I am...
Saturday, August 14, 2010 from DigiMortal
Lately I blogged about HttpNotFoundResult and HttpStatusCodeResult action results that come with ASP.NET MVC 3. These results are ideal for controller tests as we don’t have to mess with HttpContext and Response objects anymore. In this posting I will show you how to use HttpNotFoundResult in controller tests to check if errors are given correctly to user. Let’s suppose we have controller method that displays product details. public ActionResult Details(int productId){ ...
Friday, August 13, 2010 from unknown
I try and play around with ASP.net MVC as much as possible and this site is also written in MVC 2. One of the things that I thought about adding to MVC is the ability to have all the textboxes and controls updated to use HTML5. ...
Friday, August 13, 2010 from Scott Mitchell
One of the free, open-source controls on the ASP.NET team’s CodePlex page is the GeneratedImage control. In a nutshell, the GeneratedImage control is a combination of an ASP.NET Web Control and a set of classes that facilitate programmatically creating, serving, caching, and transforming images. If ...
Friday, August 13, 2010 from Nick Riggs
Why write separate actions to provide a JSON/XML API in ASP.NET MVC? If you are already using view models, MVC API Action Filter makes reusing your existing actions quick and clean.
Thursday, August 12, 2010 from jmiller
All, I've come to realize this week that I'm in need of an extended mental holiday from the absurd level of side project work that I've been doing for the past several years. I have some work on FubuMVC coming up as part of a Dovetail project, but otherwise I think I'll try to recharge the batteries for a while and shut down the computer at night for awhile. StoryTeller As of this moment, I'm shelving StoryTeller altogether. The 1.0 release was admittedly rushed for an early...
Tuesday, August 10, 2010 from James McCormack
I was thinking that it would be good to have certain MVC Actions run some common code every time they are called. Naturally we could just call a common method within our Action methods, but that would not be MVC sexeh. After all, we use special Attributes such as [Authorize] and [HttpPost] to interc ...
Monday, August 09, 2010 from ArranM
To make our site a tight as possible, I thought we’d explore the idea of removing the white space in our generated HTML. I’ve had this idea for a long time, but after reading @hugoware post about removing white space, I decided to implement it in my own projects. As with any good code, let’s stand o ...
Monday, August 09, 2010 from Luke Lowrey
I've been working on implementing some iCal functionality for the my gig guide website – Gigpig so users could easily add concert dates to their calendars.
Monday, August 09, 2010 from Nick Berardi
Today I was browsing a Microsoft published document on creating ASP.NET Web Pages using the Razor Syntax and to my surprise I found this gem on page 65. @{ var db = Database.OpenFile("SmallBakery.sdf"); var selectQueryString = "SELECT * FROM Products ORDER BY Name"; } ...
Monday, August 09, 2010 from rachel
One of the first things we need to do when creating the UI for a website or web application is setup the look, feel and layout of the site. Classic ASP and PHP developers recognize include files as a way to do this, while ASP.NET Web Forms & MVC developers use Master Pages. Razor however, allows you ...
Sunday, August 08, 2010 from sankarsan
For past couple of days I was checking out features of the new ASP.NET MVC Preview 3.There are couple of interesting new additions like integration with the new Razor viewengine,improvements in Model Validation,AJAX support and ...