zoukankan
html css js c++ java
自定义控件无法在VS.net编辑中显示
自己写了一个用户控件,拖入到编辑框只有如下图的样子,连鼠标都无法选中,怎么解决?
----------图片下方--------------------
而正常的控件应该是:
===============
update by rock jing on 2004-9-25
===============
我定义了设计时的类,用来显示,设计时候控件显示的模样。
public
class
SampleDesign
{
public
class
SampleDesigner : System.Web.UI.Design.ControlDesigner
{
public
override
string
GetDesignTimeHtml()
{
//
Component is the control instance, defined in the base
//
designer
MyLabel myLable
=
(MyLabel)
this
.Component;
string
html
=
myLable.GetHtml();
return
html;
}
protected
override
string
GetEmptyDesignTimeHtml()
{
String html
=
base
.GetEmptyDesignTimeHtml ();
html
=
"
<input type='text'
"
+
html
+
"
>
"
;
return
html;
}
protected
override
string
GetErrorDesignTimeHtml(Exception e)
{
String html
=
base
.GetErrorDesignTimeHtml (e);
html
=
"
<input type='text'
"
+
html
+
"
>
"
;
return
html;
}
}
}
结果,出现了创建控件出错。指定转换无效
查看全文
相关阅读:
一、linux 挂起进程 nohup
1.C#窗体和控件
C#笔记——5.迭代器
C#笔记——4.集合
设计模式——3.观察者模式
设计模式——2.策略模式
Code基础——1.数据结构
设计模式——1.模板方法
C#笔记——3.泛型
C#笔记——2.委托
原文地址:https://www.cnblogs.com/king_astar/p/46519.html
最新文章
考虑网站项目的设计
类是什么
Git diff patch 怎么弄?
事情做完之后的测试
modified () new commits
git 删除 untracked
display-property-grouping
number sign in php as comment
名字和密码长度
base_url 是什么
热门文章
如果一个类没有__construct
数组的合并
max-age render array drupal 8
四、kafka整体架构
三、kafka安装配置
二、kafka介绍
一、消息队列(kafka)
hadoop集群配置
C语言Windows环境配置
thymeleaf严格校验取消
Copyright © 2011-2022 走看看