社区
C#
帖子详情
无法将类型“string”隐式转换为“System.Windows.Forms.TextBox”
yehanyy
2008-10-31 02:04:52
我想让TEXTBOX框中的值等于一个常量,但是用的时候却出现错误“无法将类型“string”隐式转换为“System.Windows.Forms.TextBox””帮忙解决下。
...全文
1399
13
打赏
收藏
无法将类型“string”隐式转换为“System.Windows.Forms.TextBox”
我想让TEXTBOX框中的值等于一个常量,但是用的时候却出现错误“无法将类型“string”隐式转换为“System.Windows.Forms.TextBox””帮忙解决下。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
13 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
byg151927
2012-05-13
打赏
举报
回复
很好,对我很有帮组的
dolphin683
2008-10-31
打赏
举报
回复
textbox txt = new textbox();
txt.text = "你的string";
是是非非
2008-10-31
打赏
举报
回复
[Quote=引用 10 楼 yehanyy 的回复:]
恩,我就是写成this.textBox1="1234567"; 这样的了呀,把属性忘记了,呵呵,谢谢大家呀。
[/Quote]
看来LZ是做VB的。。。
yehanyy
2008-10-31
打赏
举报
回复
恩,我就是写成this.textBox1="1234567"; 这样的了呀,把属性忘记了,呵呵,谢谢大家呀。
ufostop
2008-10-31
打赏
举报
回复
呵呵,很有意思
lovehongyun
2008-10-31
打赏
举报
回复
txtbox.Text = "xxx";
要是Text属性才行
devilli
2008-10-31
打赏
举报
回复
System.Windows.Forms.TextBox.Text
wuyq11
2008-10-31
打赏
举报
回复
3楼正解
justindreams
2008-10-31
打赏
举报
回复
楼主一定是这样写的
this.textBox1="1234567";
别把TextBox的Text属性忘了
这样写:
this.textBox1.Text="123456";
ojekleen
2008-10-31
打赏
举报
回复
[Quote=引用 3 楼 starts_2000 的回复:]
TEXTBOX.Text = "1234";
[/Quote]
而不是textbox1="1234";
starts_2000
2008-10-31
打赏
举报
回复
TEXTBOX.Text = "1234";
lude8880
2008-10-31
打赏
举报
回复
出错代码贴出来
D6Space
2008-10-31
打赏
举报
回复
[TextBox]
C# upd服务类c.zip
using System.Collections; using System.Threading; namespace DefaultNamespace { ///
/// Description of SocketServer. ///
public class SocketServer : System.
Windows
.
Forms
.Form { private System.
Windows
.
Forms
.Label label3; private System.
Windows
.
Forms
.Label label2; private System.
Windows
.
Forms
.Rich
TextBox
rich
TextBox
ReceivedMsg; private System.
Windows
.
Forms
.
TextBox
textBox
Port; private System.
Windows
.
Forms
.Label label5; private System.
Windows
.
Forms
.Label label4; private System.
Windows
.
Forms
.
TextBox
textBox
Msg; private System.
Windows
.
Forms
.Button buttonStopListen; private System.
Windows
.
Forms
.Label label1; private System.
Windows
.
Forms
.Rich
TextBox
rich
TextBox
SendMsg; private System.
Windows
.
Forms
.
TextBox
textBox
IP; private System.
Windows
.
Forms
.Button buttonStartListen; private System.
Windows
.
Forms
.Button buttonSendMsg; private System.
Windows
.
Forms
.Button buttonClose; public delegate void UpdateRichEditCallback(
string
text); public delegate void UpdateClientListCallback(); public AsyncCallback pfnWorkerCallBack ; private Socket m_mainSocket;
无法
将
类型
string
隐形
转换
为System.
Windows
.
Forms
.TexBox
利用构造函数进行窗体间的传值, 书写 this.tbxID = sid;提示
无法
将
类型
string
隐形
转换
为System.
Windows
.
Forms
.TexBox。
初级学软件之ASP.NET第三季 ASP.NET控件的使用
初级学软件之ASP.NET第三季 ASP.NET控件的使用 视频课程主讲内容:第一讲 文本
类型
控件-Label第二讲 文件
类型
控件-
TextBox
第三讲 按钮
类型
-Button第四讲 按钮
类型
-LinkButton第五讲 按钮
类型
-ImageButton第六讲 按钮
类型
-HyperLink第七讲 选择
类型
-ListBox
错误:
无法
将
类型
“
string
”
隐式
转换
为“System.
Windows
.
Forms
.DataGridView
TextBox
Column”
出现这个错误的原因是因为 DataGridView视图设置的列名名称为name
使用winform时,出现
无法
将
类型
“
string
”
隐式
转换
为"System.
Windows
.
Forms
.
TextBox
"的错误。
已经犯了两次这个错误,我必须拿小本本把他记下来,不然对不起我自己。 如果出现这个问题,是因为在winform中,将某个控件的名称写成了Name 。 哎,说多了就是泪,拿小本本记下来,以后就不会犯错了。...
C#
110,499
社区成员
642,566
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章