佳木斯湛栽影视文化发展公司

主頁(yè) > 知識(shí)庫(kù) > asp.net 組件開發(fā)中的內(nèi)嵌資源引用

asp.net 組件開發(fā)中的內(nèi)嵌資源引用

熱門標(biāo)簽:電子圍欄 服務(wù)器配置 Linux服務(wù)器 阿里云 團(tuán)購(gòu)網(wǎng)站 銀行業(yè)務(wù) 科大訊飛語(yǔ)音識(shí)別系統(tǒng) Mysql連接數(shù)設(shè)置
類名字空間前資源注冊(cè)
復(fù)制代碼 代碼如下:

[assembly: System.Web.UI.WebResource("XXX.js.FilePlugin.js", "text/javascript")]
OnPreRender事件
//資源名稱
string _strResourceKey = ""; //資源名稱
ClientScriptManager _csm = Page.ClientScript;
//if (this.Page.Header.FindControl(_strResourceKey) == null)
//{
// string _src = _csm.GetWebResourceUrl(this.GetType(), _strResourceKey);
// Literal _literal = new Literal();
// _literal.ID = _strResourceKey;
// _literal.Text = string.Format("\nscript type=\"text/javascript\" src=\"{0}\" >/script>", _src);
// this.Parent.Page.Header.Controls.Add(_literal);
//}
//if (!this.Page.ClientScript.IsStartupScriptRegistered(_strResourceKey))
//{
// string _src = _csm.GetWebResourceUrl(this.GetType(), _strResourceKey);
// _src = string.Format("\nscript type=\"text/javascript\" src=\"{0}\" >/script>", _src);
// Page.ClientScript.RegisterStartupScript(this.GetType(), _strResourceKey, _src);
//}
if (!this.Page.ClientScript.IsClientScriptIncludeRegistered(_strResourceKey))
{
string _src = _csm.GetWebResourceUrl(this.GetType(), _strResourceKey);
Page.ClientScript.RegisterClientScriptInclude(this.GetType(), _strResourceKey, _src);
}
您可能感興趣的文章:
  • ASP.NET主機(jī)資源控制的一些心得
  • asp.net(C#) 開源資源大匯總
  • asp.net中資源文件的使用
  • 實(shí)例講解.NET中資源文件的創(chuàng)建與使用
  • .NET 資源文件resx、Resources詳細(xì)說(shuō)明
  • ASP.NET 服務(wù)器路徑和一般資源調(diào)用
  • 詳談.net中的垃圾回收機(jī)制
  • asp.net中virtual和abstract的區(qū)別分析
  • ASP.NET實(shí)現(xiàn)將word文檔轉(zhuǎn)換成pdf的方法
  • ASP.NET配置文件Web.config用法詳解
  • ASP.net全局程序文件Global.asax用法分析
  • .net非托管資源的回收方法

標(biāo)簽:江蘇 蚌埠 棗莊 衢州 廣元 萍鄉(xiāng) 衡水 大理

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《asp.net 組件開發(fā)中的內(nèi)嵌資源引用》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    长岛县| 绵竹市| 乡宁县| 郴州市| 板桥市| 仪征市| 吴忠市| 宜昌市| 丰都县| 万年县| 石家庄市| 商城县| 恩施市| 龙海市| 通海县| 当雄县| 庆安县| 仁寿县| 孟津县| 隆昌县| 玛多县| 家居| 游戏| 朝阳区| 新平| 衡阳县| 庆云县| 疏勒县| 璧山县| 剑河县| 娄底市| 兴和县| 珠海市| 东光县| 比如县| 南城县| 绥中县| 浦江县| 康平县| 会同县| 方正县|