我收到了使用textbox system.windows.forms.textbox的消息 [英] I got a message from using textbox system.windows.forms.textbox

查看:85
本文介绍了我收到了使用textbox system.windows.forms.textbox的消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用c#2010开发Windows应用程序并使用水晶报表,对于此报表,我将表单文本框值传递给使用文本对象的水晶报表。但我有一个显示文本框 -

I am developing windows application using c# 2010 and using crystal report, for this report i am passing my form text box values to crystal report using text object. but i got a display text box -

System.Windows.Forms.TextBox





-how要解决这个错误请任何人指导我。



我尝试过:



我收到使用文本框的消息System.Windows.Forms.TextBox



-how to solve this error please any one guide me.

What I have tried:

I got a message from using textbox System.Windows.Forms.TextBox

推荐答案

而不是传递文本框 - 或在文本框中使用ToString - 使用Text属性。

如果你使用它:

Instead of passing the textbox - or using ToString on a Text box - use the Text property.
If you use this:
TextBox myTextBox = new TextBox();
myTextBox.Text = "hello";
string s = myTextBox.ToString();



您将获得System.Windows。 Forms.TextBox,Text:hello

如果你使用它:


You will get "System.Windows.Forms.TextBox, Text: hello"
If you use this:

TextBox myTextBox = new TextBox();
myTextBox.Text = "hello";
string s = myTextBox.Text;



你会得到你好


You will get "hello"


这篇关于我收到了使用textbox system.windows.forms.textbox的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆