1、在项目中新建类:全局应用程序类:Global.asax
2、在Global.asax的Application_Start事件中添加如下代码:
ScriptManager.ScriptResourceMapping.AddDefinition("jquery", new ScriptResourceDefinition
{
Path = "~/scripts/jquery-1.7.2.min.js",
DebugPath = "~/scripts/jquery-1.7.2.js",
CdnPath = "http://ajax.microsoft.com/ajax/jQuery/jquery-1.7.2.min.js",
CdnDebugPath = "http://ajax.microsoft.com/ajax/jQuery/jquery-1.7.2.js"
});