[英]Failed to create embedded resource in vs 2008 express
I have extended asp gridview for giving column filter and I wish to embedded the js file along with this control. 我已经扩展了asp gridview以提供列过滤器,并且希望将js文件与该控件一起嵌入。
For this i have done 为此,我做了
Embedded Resource
Embedded Resource
Added the fpllowing code in OnInit() of grid 在网格的OnInit()中添加了以下代码
base.OnInit(e); Type t = this.GetType().BaseType; ScriptManager.RegisterClientScriptResource(this, t, "ControlLibrary.js.quicksearch.js");
But the RegisterClientScriptResourceis giving me an exception 但是RegisterClientScriptResource给了我一个例外
Web resource ControlLibrary.js.quicksearch.js' was not found.
I tried the above in vs 2008 express edition. 我在vs 2008 Express Edition中尝试了上述方法。
Why i cannot embedded .js file in dll. 为什么我无法在dll中嵌入.js文件。 Any help will be appreciated
任何帮助将不胜感激
Ok I sorted it out 好,我整理了一下
Instead of type t
we have to give the assembly where the embedded script is found 而不是类型
t
我们必须提供找到嵌入式脚本的程序集
Following code solved my issue 以下代码解决了我的问题
Type t = typeof(ControlLibrary.HWGridView);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.