'jquery' is not a valid script name. The name must end in '.js'.
after follow
http://connect.microsoft.com/VisualStudio/feedback/details/735928/in-asp-net-web-application-visual-basic-the-requiredfieldvalidator-doest-work
When targeting .NET 4.5 we enable Unobtrusive Validation by default. You need to have jQuery in your project and have something like this in Global.asax to register jQuery properly:
ScriptManager.ScriptResourceMapping.AddDefinition("jquery", new ScriptResourceDefinition {
Path = "~/scripts/jquery-1.4.1.min.js",
DebugPath = "~/scripts/jquery-1.4.1.js",
CdnPath = "http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.1.min.js",
CdnDebugPath = "http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.1.js"
});
Replacing the version of jQuery with the version you are using. You can also disable this new feature in web.config by removing the following line:
<add key="ValidationSettings:UnobtrusiveValidationMode" value="WebForms" />
<head id="Head1" runat="server">
<title></title>
<link href="css/cupertino/jquery-ui-1.10.3.custom.css" rel="stylesheet">
<script src="js/jquery-1.9.1.js"></script>
<script src="js/jquery-ui-1.10.3.custom.js"></script>
<script src="js/themeswitchertool.js" type="text/javascript"></script>
got error 'jquery' is not a valid script name. The name must end in '.js'.
then search stackoverflow, it said that use nuget to install following
After install
Install-Package AspNet.ScriptManager.jQuery.UI.Combined
Install-Package AspNet.ScriptManager.jQuery
and change to
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<link href="css/cupertino/jquery-ui-1.10.3.custom.css" rel="stylesheet">
<script src="Scripts/jquery-2.1.0.js"></script>
<script src="Scripts/jquery-ui-1.10.4.js"></script>
<script src="js/themeswitchertool.js" type="text/javascript"></script>
still got error
Server Error in '/' Application.
'jquery' is not a valid script name. The name must end in '.js'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: 'jquery' is not a valid script name. The name must end in '.js'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: 'jquery' is not a valid script name. The name must end in '.js'.]
System.Web.UI.ScriptReference.GetDebugName(String releaseName) +175
System.Web.UI.ScriptReference.ShouldUseDebugScript(String releaseName, Assembly assembly, Boolean isDebuggingEnabled, Assembly currentAjaxAssembly) +73
System.Web.UI.ScriptReference.DetermineResourceNameAndAssembly(ScriptManager scriptManager, Boolean isDebuggingEnabled, String& resourceName, Assembly& assembly) +199
System.Web.UI.ScriptReference.GetUrlFromName(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip, Boolean useCdnPath) +158
System.Web.UI.ScriptReference.GetUrlInternal(ScriptManager scriptManager, Boolean zip, Boolean useCdnPath) +943
System.Web.UI.ScriptReference.GetUrlInternal(ScriptManager scriptManager, Boolean zip) +103
System.Web.UI.ScriptReference.GetUrl(ScriptManager scriptManager, Boolean zip) +271
System.Web.UI.ScriptManager.RegisterUniqueScripts(List`1 uniqueScripts) +370
System.Web.UI.ScriptManager.RegisterScripts() +735
System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +206
System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +158
System.Web.UI.Page.PerformPreRenderComplete() +62
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5409