Monday, December 26, 2011

New Zealand radio stations online

Below are some New Zealand radio stations that can be listened to live online. Let me know if you find any channels I haven't listed here or if any of these links don't work.


And the following live TV channels:

Tuesday, December 6, 2011

Validating a single field using MVC 3 unobtrusive validation

I recently ran into a problem using the jQuery autocomplete control with ASP.NET MVC3 unobtrusive validation. Everything worked correctly except for the scenario where the user clicked an option in the drop-down using the mouse. When this happened, the validation event was not fired against the item the user clicked because no keyboard action had taken place. The solution was to fire the validation event in the select event of the autocomplete control.

To validate the single field using MVC 3 programatically, I used the following JavaScript:
$("form").validate().element($(elementToValidate));