Asp.Net MVC Calendar Helper

Calendar DemoRecently while working on a project with Asp.Net MVC 3 there was a need for a small calendar similar to the calendar control. After some searching I decided that the easiest method to get this done would be to write a Html Helper. Below is the code that seems to work nicely. This works even if the browser does not support javascript. For added functionality you could add an extra parameter to show highlighted dates or extend it to fill a page and add content to the cells.

713. Adding Reversed Numbers – Solution

100. The 3n + 1 Problem – Solution

583. Prime Factors – Solution

10200. Prime Time – Solution

1026. Questions and Answers – Solution

899. Ws Cipher – Solution

29. Hash It! – Solution

After going back and forth over this code for it seems like an eternity (about an hour) I finally got an accepted solution. The problem turned out to be a small typo.

Here it is, my solution to in C#.