要求该文件能使用assembly1.GetManifestResourceStream("文件名.js");来读取。

解决方案 »

  1.   

    参考
    http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/msg/b886925e4679b0bb2.0 参考
    http://aspalliance.com/726
      

  2.   

    思归那文章里的WebControlUtility是要自己写?如果我会写我想我就不会问这个问题了……
    从编译结果的dll文件大小来看,js文件已经编译进去了,但是好像还要干点什么别的事才能读出它,这个“别的事”我就不知道是什么事了,教教我啊
      

  3.   

    http://english.ccidnet.com/tech/guide/2002/01/21/92_3939.html
    http://english.ccidnet.com/tech/guide/2002/01/22/92_3940.html
      

  4.   

    一般是2种做法,一是全部读出来,然后写入当前aspx页面,
     using (System.IO.StreamReader reader = new System.IO.StreamReader(Assembly.GetManifestResourceStream(typeof(FooControl), "FooControl.js"))) { 
      String script = "<script language='javascript' type='text/javascript' >\r\n<!--\r\n" + reader.ReadToEnd() + "\r\n//-->\r\n</script>";
      this.Page.RegisterClientScriptBlock(scriptKey, script);
     }
    二是写个httphandler,
    <script language='javascript' type='text/javascript' src="yourhttphandler.ashx'></script>