我正在开发一个WEB_PART,我想知道是否有一些方法来找出在母版页项目中是否存在任何JQUERY LIB,其中将插入web部件。
我想做这样的事情:
if (jQuery) {
// jQuery is loaded
Page.ClientScript.RegisterClientScriptInclude(typeof(WebpartSlideShow), "jQuery", "/_layouts/Jquery-Cycle/jquery-1.5.1.min.js");
Page.ClientScript.RegisterClientScriptInclude(typeof(WebpartSlideShow), "jQueryCycle", "/_layouts/Jquery-Cycle/jquery.cycle.all.min.js");
// break;
} else {
// jQuery is not loaded
Page.ClientScript.RegisterClientScriptInclude(typeof(WebpartSlideShow), "jQueryCycle", "/_layouts/Jquery-Cycle/jquery.cycle.all.min.js");
}发布于 2012-07-31 22:15:37
http://msdn.microsoft.com/en-us/library/255xet9e.aspx
Page.ClientScript.IsClientScriptIncludeRegistered("jQuery");不过,您可能应该定义一些常量。
https://stackoverflow.com/questions/11742084
复制相似问题