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;
}
}
}
结果,出现了创建控件出错。指定转换无效
查看全文
相关阅读:
[LeetCode] 1218. Longest Arithmetic Subsequence of Given Difference 最长定差子序列
[LeetCode] 1217. Minimum Cost to Move Chips to The Same Position 玩筹码
[LeetCode] 1209. Remove All Adjacent Duplicates in String II 移除字符串中所有相邻的重复字符之二
[.Net Core] Visual Studio for Mac Add Client Side Library
一手遮天 Android
一手遮天 Android
一手遮天 Android
一手遮天 Android
一手遮天 Android
一手遮天 Android
原文地址:https://www.cnblogs.com/king_astar/p/46519.html
最新文章
.NET 6 中的HTTP 3支持
.NET 6 RC1 正式发布
2021 年 9 月 TIOBE 指数 C# 同比增长突破 1.2%
UOS LoongArch 上成功安装.NET Core 3.1
RocketMQ 摘要
[LeetCode] 1235. Maximum Profit in Job Scheduling 规划兼职工作
[LeetCode] 1234. Replace the Substring for Balanced String 替换子串得到平衡字符串
[AWS] Solve CodeBuild Issue: Certificate verification failed: The certificate is NOT trusted
[LeetCode] 1233. Remove Sub-Folders from the Filesystem 删除子文件夹
Solve Error: ENFILE: file table overflow
热门文章
[LeetCode] 1232. Check If It Is a Straight Line 缀点成线
[LeetCode] 1227. Airplane Seat Assignment Probability 飞机座位分配概率
[LeetCode] 1224. Maximum Equal Frequency 最大相等频率
[LeetCode] 1223. Dice Roll Simulation 掷骰子模拟
Visual Studio Code Debug C++ on Mac
[LeetCode] 1222. Queens That Can Attack the King 可以攻击国王的皇后
[LeetCode] 1221. Split a String in Balanced Strings 分割平衡字符串
[LeetCode] 1220. Count Vowels Permutation 统计元音字母序列的数目
[LeetCode] 1219. Path with Maximum Gold 黄金矿工
Solve VsVim Issue with Visual Studio for Mac: ClosePair(')')
Copyright © 2011-2022 走看看