首页  >  新闻动态  > 常见问题

asp.net中如何加入嵌入资源

asp.net中如何加入嵌入资源?

1.class.js 设为嵌入的资源

2.AssemblyInfo.cs中或类中加入:

[assembly: System.Web.UI.WebResource("Mvcb2b.Scripts.class.js", "application/x-javascript")]

Mvcb2b为程序集名

3.控件中加入:

Page.ClientScript.RegisterClientScriptResource(typeof(Liveclass), "Mvcb2b.Scripts.class.js");

相关文章
http://www.aspxadmin.com/Content/weixinlogo.jpg
阅速CMS系统提供用户体验更佳的国内Cms软件
asp.net中如何加入嵌入资源