What does the UnobtrusiveJavaScriptEnabled key do in .NET?

I am very familiar with unobtrusive Javascript as a template, but I'm curious what this means. NET framework.

I am working on a project as a third-party developer that uses .NET on the back. While working with a developer (who also manages the server), he mentioned that UnobtrusiveJavaScript should be set to false for our project. That is, the web.config project should have the following:

<appSettings> ... <add key="UnobtrusiveJavaScriptEnabled" value="false" /> </appSettings> 

My first reaction was that it was bad practice, but when I, although more on that later, realized that I really didn’t understand why .NET even had such a configuration at the project level to start, or even for our specific project .

+6
source share
1 answer

From here :

The purpose of this setup is explained by Brad Wilson in his post Unobtrusive Client Validation in ASP.NET MVC 3 . In short, when you disable this setting, client-side validation is performed using Microsoft javascript libraries (just as it was done in ASP.NET MVC 1 and 2). Otherwise (with the setting turned on), client-side validation is performed using jQuery validation.

In other words, your application probably has code that depends on the Microsoft JavaScript libraries that perform the validation.

+7
source

All Articles