Tag Archives: MVC3

Simple MVC 3 Notifications (with Razor and jQuery)

This needs to be said first: I am brand new to ASP.NET MVC 3.  Before about 2 or 3 weeks ago, I didn’t really care about MVC, nor did I have any real desire to learn it.  What changed my mind was the work group I work in, and the unwillingness some people in that group have to learn new things.  I didn’t want to get left behind, so I decided to choose something that was gaining a lot of support, both from developers and Microsoft as well, and that was MVC.  Now, with that said, keep in mind I’ve only been coding MVC for about 2 weeks max.  The issue that I ran into last night, was I wanted to display a simple notification to the user when they updated their support ticket in the ticketing application I’m working on.  I found 3 very different implementations of a notification system last night, but felt that they were a little too complex for what I wanted to do.  The outcome of my research last night led me to building an extremely simplified combination of all 3 implementations.  For reference, the 3 implementations I found are:

http://blogs.planetcloud.co.uk/mygreatdiscovery/post/Using-TempData-to-display-notifications.aspx (Ben)


http://blogs.taiga.nl/martijn/2011/05/03/keep-your-users-informed-with-asp-net-mvc/ (Martijn)

I used the simplified display from Ben’s example, the jQuery from Digital Tool Factory’s example and the look and feel from Martijn’s example.  This allowed me to basically have my own implementation of the notification system that did exactly what I wanted and looked the way I want.  The end result looks like this:

Continue reading Simple MVC 3 Notifications (with Razor and jQuery)