我已经扩展了asp gridview以提供列过滤器,我希望将js文件与此控件一起嵌入。
为此我已经完成了
Embedded Resource
在网格
的OnInit()中添加了fpllowing代码 base.OnInit(e);
Type t = this.GetType().BaseType;
ScriptManager.RegisterClientScriptResource(this, t, "ControlLibrary.js.quicksearch.js");
但是RegisterClientScriptResource给了我一个异常
Web resource ControlLibrary.js.quicksearch.js' was not found.
我在vs 2008快车版中尝试了上述内容。
为什么我不能在dll中嵌入.js文件。任何帮助将不胜感激
答案 0 :(得分:0)
好的我把它整理出来了
而不是类型t
,我们必须给出发现嵌入脚本的程序集
以下代码解决了我的问题
Type t = typeof(ControlLibrary.HWGridView);