Adding client-side validation to custom Editor Templates in MVC

When an editor template is overridden with custom one you lose automatic scaffolding of client-side validation which uses data annotation rules. In such a case they should be added manually to your templates. In the beginning of HTML form you should add  @Html.ValidationSummary(true). The parameter excludePropertyErrors = true because I don’t want to mix up error for […]

Pitfalls of Building Ajax Grid with ASP.NET MVC and jQuery/JavaScript

This article is about pitfalls which should be considered when you’re implementing an Ajax grid with jQuery and ASP.NET MVC. The sample in the article can be used as a starting point to more complicated version of any grid since it provides a complete set of required features: create, edit, delete, filtering, sorting and pagination. […]

MvcSiteMapProvider localization with Resources

The links to descriptions of the approach. It is strongly required to use App_GlobalResources and place resource files with localized strings in it.

Post JSON objects with nested classes to MVC action

Default view model binding of ASP.NET MVC has a disadvantage when using view models with nested classes and JSON objects. The binding is unable to recognize such nested classes and it initializes them to NULL value. This text describes a cause and solutions.

How to specify Expires header for static resources in ASP.NET MVC?

Thanks to author of the post on He posted a link to the broadest description of the ways the header “Expires” can be specified for static resources. Here it is – clientCache. Finally, I put the following setting in my web.config: <system.webServer> <staticContent> <!–Never Expires–> <clientCache cacheControlMode=”UseExpires” httpExpires=”Sun, 07 Apr 2047 00:00:00 GMT” /> […]