.net 页面动态注册CSS 、JS
//注册JS if (!Page.ClientScript.IsClientScriptIncludeRegistered(GetType(), "abc")) { Page.ClientScript.RegisterClientScriptInclude(GetType(), "abc", ResolveClientUrl("js文件路径")); } //注册CSS ClientScript.RegisterClientScriptBlock(GetType(), "regCss", "<link rel=\"stylesheet\" type=\"text/css\" href=\"" css文件路径") + "\" />");