Tired of looking for errors in log files? Use OneTrueError - Automatic exception management for .NET.

Tag Archives: asp.net-mvc

Displaying date/time using the user timezone in ASP.NET MVC

This post will show you how you can display date/time using the user timezone (without it being configured anywhere in your application).

Posted in CodeProject | Tagged | 3 Comments

How to dynamically modify model meta data in ASP.NET MVC

Normally you just add the [Required] attribute to a view model to make it required. But I needed a way to configure whether a field to be required or not. The requirement was that it should be configured through web.config: … Continue reading

Posted in Architecture | Tagged | Leave a comment

Adding a required indicator in ASP.NET MVC3 using jQuery

You might want to indicate that fields in ASP.NET MVC3 is required visually. It’s easy thanks to the HTML attributes that the unobtrusive validation API generates. Start by adding a new CSS class in your site.css called something like .required-indicator. … Continue reading

Posted in Uncategorized | Tagged , | 2 Comments

How to handle transactions in ASP.NET MVC3

I got annoyed about having to repeat the transaction handling in every POST method of my controllers. First of all: I don’t want to have to take the unit of work in the constructor of each controller, since that implicitly … Continue reading

Posted in CodeProject | Tagged , | 9 Comments

Repositories, Unit Of Work and ASP.NET MVC

There are a lot of posts discussing repository implementations, unit of work and ASP.NET MVC. This post is an attempt to give you and answer which addresses all three issues. Repositories Do NOT create generic repositories. They look fine when … Continue reading

Posted in Architecture, CodeProject | Tagged , | 3 Comments

Get an unique session in each browser tab

I got a lot to do at work, hence the silence. I got a lot to blog about, but so little time ;/ I found an interesting question at stackoverflow which this answer is for (also to show you that … Continue reading

Posted in Architecture, CodeProject | Tagged | 14 Comments

How to handle errors in ASP.NET MVC

There are several blog posts regarding error handling for ASP.NET MVC. They use everything from Application_Error to exception handling in the base controller. With this post I’ll show how you can use the built in features in MVC to treat … Continue reading

Posted in CodeProject | Tagged , | 9 Comments

First draft of my alternative HTML helpers

I’m getting closer to a first release of my ASP.NET MVC contribution project called Griffin.MvcContrib. I’ve just committed my first draft of the alternative HTML helpers. I’ve focused on helpers for Form tags in this commit. If you are wondering … Continue reading

Posted in Uncategorized | Tagged , | 2 Comments

A more structured MembershipProvider.

If you take a look at the official documentation that tells you how to create your own custom MembershipProvider you’ll notice that the documentation is mostly about describing: how you should throw exceptions and when Which events you should invoke … Continue reading

Posted in Architecture, CodeProject | Tagged , , | Leave a comment

Why extension methods should not be used as part of a framework.

Two of my favorite frameworks/libraries uses extension methods heavily. Autofac uses extension methods during registration and ASP.NET MVC3 for their HTML Helpers. Since extension methods are static, they are closed for extension. Which are one of the most important principles … Continue reading

Posted in Architecture, CodeProject | Tagged , , | 1 Comment