0

I have a basic ASP.NET Web App setup with a master page that adds all of the scripts the app needs: In the following order: jquery.js, bootstrap.js, jgrowl.js, site.js

All of my pages inherit from this master page.

The pages without RequiredFieldValidators on them are able to run the $.jGrowl() function with no problem. If a RequiredFieldValidator is on the page I get the js error:

"undefined is not a function" right at the line where I call the jGrowl function to display my message "$.jGrowl(msg)"

Usually when this error appears it it because of duplicate calls to jQuery or jGrowl. Does the ASP.NET RequiredFieldValidator control do something that I don't know about?

JTunney
  • 914
  • 1
  • 15
  • 46

1 Answers1

2

Didn't realize there was a setting for this exact reason. Just need to enable UnobtrusiveValidationMode because otherwise the validation controls try to load jQuery in your page.

Example:

<appSettings>
  <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
</appSettings>
JTunney
  • 914
  • 1
  • 15
  • 46