使用这样的方法来注册你的js文件:
if (!Page.ClientScript.IsClientScriptIncludeRegistered(this.GetType(), "checkAll"))
{
Page.ClientScript.RegisterClientScriptInclude("checkAll", Page.ResolveClientUrl("~/script/GridView.js"));
}或者使用:
Page.ClientScript.RegisterStartupScript(this.GetType(), "QxshScript", "<script>window.location.href=window.location.href;</script>");
这样的来注册直接运行的js代码
if (!Page.ClientScript.IsClientScriptIncludeRegistered(this.GetType(), "checkAll"))
{
Page.ClientScript.RegisterClientScriptInclude("checkAll", Page.ResolveClientUrl("~/script/GridView.js"));
}或者使用:
Page.ClientScript.RegisterStartupScript(this.GetType(), "QxshScript", "<script>window.location.href=window.location.href;</script>");
这样的来注册直接运行的js代码
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货