[Editor(typeof(ImageUrlEditor), typeof(UITypeEditor))]无效的可能原因_.NET_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > .NET > [Editor(typeof(ImageUrlEditor), typeof(UITypeEditor))]无效的可能原因

[Editor(typeof(ImageUrlEditor), typeof(UITypeEditor))]无效的可能原因

 2013/10/25 18:45:51  Sun_rain_ice  博客园  我要评论(0)
  • 摘要:开发的用户控件封存在dll中,其他都很顺利,就是这个图片弹出选择路径怎么也搞不出来!(浪费了我半天*2,o(︶︿︶)o唉,犟脾气拗不过看了很多搜索信息都说加:[Editor(typeof(ImageUrlEditor),typeof(UITypeEditor))][EditorAttribute(typeof(System.Web.UI.Design.ImageUrlEditor),typeof(UITypeEditor))][EditorAttribute("System.Web.UI
  • 标签:URL 原因

开发的用户控件封存在dll中,其他都很顺利,就是这个图片弹出选择路径怎么也搞不出来!(浪费了我半天*2,o(︶︿︶)o 唉,犟脾气拗不过

看了很多搜索信息都说加:

[Editor(typeof(ImageUrlEditor), typeof(UITypeEditor))]

[EditorAttribute(typeof(System.Web.UI.Design.ImageUrlEditor), typeof(UITypeEditor))]

[EditorAttribute("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]

但是,都没用,简直快到穷途末路了。。。然后下到一个Foreigner在ASP论坛提问相关问题时上传的一个控件项目

http://forums.asp.net/p/1134139/1810467.aspx

把里面的属性完全拷贝出来,一个一个试,终于发现是下面这货没加:

[UrlProperty("*.jpeg;*.jpg;*.gif;*.png;")]

把这条加上,然后重新引用重新添加控件,终于OK了。

PS.也下了其他两个网上的项目源代码资源,但是都没有这句,不知道别人是怎么pass的,真是太邪门了>_<

 

 

发表评论
用户名: 匿名