Unobtrusive JavaScript in MVC 3

Unobtrusive JavaScript is a general term that conveys a general set of guidelines or margins to the term REST.

REST is nothing but the Representational State Transfer.

We can explain Unobtrusive JavaScript as- it is not your particular JavaScript code that you generally use in your markup page.

Example

In spite of using event attributes like
  • 'onbuttonclick'
  • 'onpageload'
  • 'onsubmit'
  • 'onclick'
  • 'mouseover'
Etc.

Unobtrusive JavaScript, attaches element directly by their ID or class, in the presence of the other attributes.

Functionality

MVC 3 uses the concept of Unobtrusive JavaScript in these two:
  • AJAX helpers
    (Such as Ajax. ActionLink and Ajax. BeginFrom)
    Ajax helpers are most commonly used with JQuery and extensible attributes.
  • AJAX validations

    Ajax validations are most commonly used to

    JSON Binding, JQuery Validations

Ebook Download
View all
Learn
View all