如何把JS文件嵌入资源文件

参看文章:http://weblogs.asp.net/dwahlin/archive/2007/04/29/creating-custom-asp-net-server-controls-with-embedded-javascript.aspx

如何使用[assembly: WebResource]:http://msdn.microsoft.com/en-us/library/system.web.ui.webresourceattribute.aspx

这一段代码比较有用,如何查看所有嵌入到Assembly之中资源的名字:

string[] resources = 
    this.GetType().Assembly.GetManifestResourceNames();

foreach (string resourceName in resources)
{
    Debug.WriteLine(resourceName);
}

posted on 2010-01-09 22:06  m2land  阅读(950)  评论(0编辑  收藏  举报

导航