Turn Your EPiServer 7 MVC Page/Block Model into a View Model using the Ignore Attribute

If you've ever built a large MVC application, you'll know that your project can sometimes contain a large amount of files, some of which act as a layer of code between two aspects of the application. One such file is the view model, which is used to transfer data from the controller to the view.

When developing with EPiServer 7 MVC, in most situations you can use the page or block model directly in your view. There are some cases, however, where you'll find yourself using a separate view model to satisfy the needs of the view.

More »

Creating a XForm Block in EPiServer 7 MVC with Working Validation (Updated)

I initially posted this solution on the Nansen blog, but since then the code has been updated for both bug fixes and to reduce unnecessary layers (at least, unnecessary for my situation).

With the flexibility that block types offer in EPiServer 7, it would make sense that one common feature that people would want is an XForm in a block, so editors can freely add, move, and reuse blocks with forms around their website. In a recent project, this was one of my requirements.

More »