您的位置:首页 > Web前端 > CSS

.net webform 如何在UserControl里链接css和js

2015-11-04 14:28 501 查看
protected void Page_Load(object sender, EventArgs e)
{
if (!this.Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "jquery.autocomplete.css"))
this.Page.ClientScript.RegisterClientScriptBlock(
this.GetType(),
"jquery.autocomplete.css",
"<link href='" + ResolveClientUrl("~/css/jquery.autocomplete.css") + "' rel=\"stylesheet\" />");

if (!this.Page.ClientScript.IsClientScriptIncludeRegistered(this.GetType(), "jquery.autocomplete.js"))
this.Page.ClientScript.RegisterClientScriptInclude(
this.GetType(),
"jquery.autocomplete.js",
ResolveClientUrl("~/js/jquery.autocomplete.min.js"));
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: