Category Archives: ASP.NET MVC

Bind a model property to a different named query string field

How to bind a model property to a different named query string field with a custom alias attribute and model binder in MVC3.

Posted in ASP.NET MVC | Tagged , , , | Leave a comment

Grouping data with LINQ and MVC

Showing a list or table of data in groups is very common, and fortunately also very easy to do with LINQ. In the end we want our data to look something like this:

Posted in ASP.NET MVC | Tagged , | 1 Comment

Mapping relational table data to a tree structure in MVC

How to map SQL table data into a tree structure and display it as a nested list using recursive Razor display templates.

Posted in ASP.NET MVC | Tagged , | 4 Comments

Localization with fallback using LINQ

How to get localization in MVC with fallback using a single LINQ statement, translated texts will be selected if available or fallback to a default.

Posted in ASP.NET MVC | Tagged , | Leave a comment

Custom MembershipProvider, Principal and Identity

Implementing a custom MembershipProvider, IPrincipal and IIdentity. How to cache the objects accross page requests and access the objects through a wrapper.

Posted in ASP.NET MVC | Tagged , , , | 6 Comments