2011-02-14 25 views
1

如何將字符串的內容放入使用C#的文本框的顯示中?C#將數據輸入到Texbox

謝謝。

+1

如果您有任何以下問題可以解決您的問題,您應該接受一個答案 – Divi 2011-02-14 04:44:20

回答

3
string a = "My Message"; 


textbox1.Text = a; 
7

設置Text屬性。

textBox1.Text = "Hello, world!"; 
0

的Textbox.Text屬性包含文本框的字符串。

String s = "Hello world"; 
// To set the text of a textbox 
tbString.Text = s; 
// To append string to the textbox 
tbString.Text += s;