且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何获得Page.ClientScript.RegisterClientScriptInclude在头包括哪些内容?

更新时间:2023-12-05 23:24:46

直接inlcude它的头部:

to directly inlcude it in the HEAD:

HtmlGenericControl Include = new HtmlGenericControl("script"); 
Include.Attributes.Add("type", "text/javascript"); 
Include.Attributes.Add("src", sInclude); 
this.Page.Header.Controls.Add(Include);

你想检查,以确保它已经不存在添加它之前。

you would want to check to make sure its not there already before adding it.