c#做一个按钮,点击它后label显示textbox中输入的内容
privatevoidbutton1_Click(objectsender,RoutedEventArgse){label3.Text=textBox1.Text;}可是...
private void button1_Click(object sender, RoutedEventArgs e)
{
label3.Text = textBox1.Text;
}
可是有这个问题,label3.Text,Text有问题。是怎么回事呢?
Error 1 'System.Windows.Controls.Label' does not contain a definition for 'Text' and no extension method 'Text' accepting a first argument of type 'System.Windows.Controls.Label' could be found (are you missing a using directive or an assembly reference?) C:\Users\yikchin\Documents\asp\Question3_1\Question3_1\Window1.xaml.cs 30 20 Question3_1 展开
{
label3.Text = textBox1.Text;
}
可是有这个问题,label3.Text,Text有问题。是怎么回事呢?
Error 1 'System.Windows.Controls.Label' does not contain a definition for 'Text' and no extension method 'Text' accepting a first argument of type 'System.Windows.Controls.Label' could be found (are you missing a using directive or an assembly reference?) C:\Users\yikchin\Documents\asp\Question3_1\Question3_1\Window1.xaml.cs 30 20 Question3_1 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询