使用这样的方法来注册你的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代码