What is jQuery Unobtrusive Validation?

Brad Wilson has a couple great articles on unobtrusive validation and unobtrusive ajax.It is also shown very nicely in this Pluralsight video in the section on ” AJAX and JavaScript”. Basically, it is simply Javascript validation that doesn’t pollute your source code with its own validation code. This is done by making use of data- attributes in HTML.

There is no ViewData item of type ‘IEnumerable‘ that has the key country

In your action change ViewBag.countrydrop = item8 to ViewBag.country = item8;and in View write like this: Actually when you write @Html.DropDownList(“country”, (IEnumerable)ViewBag.country, “Select country”) or Html.DropDownList(“country”,”Select Country) it looks in for IEnumerable<SelectListItem> in ViewBag with key country, you can also use this overload in this case: See Working DEMO Example