i use ScriptManager.RegisterClientScriptInclude to include js file after partial postback it works fine here : **
ScriptManager.RegisterClientScriptInclude(this, typeof(test4), "1", Page.ResolveClientUrl("~/slideshow/js/slideshow.js"));
** but i want to load more than one js files so i did this **
ScriptManager.RegisterClientScriptInclude(this,typeof(test4),"one", Page.ResolveClientUrl("~/slideshow/js/slideshow.js")); ScriptManager.RegisterClientScriptInclude(this, typeof(test4), "two", Page.ResolveClientUrl("~/slideshow/js/slideImg.js"));
** with two different string keys the first one works but the second not....please any help
The following code works fine for me:
string jquery = "js/jquery-1.4.min.js";
Page.ClientScript.RegisterClientScriptInclude(jquery, jquery);
string myScript = "js/myScript.js";
Page.ClientScript.RegisterClientScriptInclude(myScript, myScript);
I put it in my OnPreRender method
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.