yongtaiyu

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

1、设置要嵌入资源的生成操作为“嵌入的资源”

 

2、在要使用的地方添加如下代码

   protected override void OnPreRender(EventArgs e)
        {
            if (this.Page != null)
            {
                Page.ClientScript.RegisterClientScriptInclude("InputCalendar", Page.ClientScript.GetWebResourceUrl(this.GetType(), "GSystem.Web.WebControls.Resources.Scirpts.InputCalendar.js"));
                base.CreateChildControls();
            }
            base.OnPreRender(e);
        }


3、参考:

在自定义Server Control中捆绑JS文件 Step by Step

http://www.cnblogs.com/jackielin/archive/2005/11/29/286570.html

http://www.cnblogs.com/skywang/articles/1364685.html

http://birdshome.cnblogs.com/archive/2004/12/19/79309.html

posted on 2012-11-12 15:32  yongtaiyu  阅读(354)  评论(0编辑  收藏  举报