napdhbk
March 12th, 2003, 04:42 PM
Hi gurus, I create a C#.NET Web application, it has a Web form containing: a Button, a TextBox a Label. Then, I
add function to handle Button_Click event like this:
private void Button1_Click(object sender, System.EventArgs e)
{
Label1.Text = TextBox1.Text;
}
I run this web application, type something in TextBox1, then click button Button1 but nothing happen, Label1 doesn't change! when I debug this, I found that in function Button1_Click, TextBox1.Text is "" !? What happen here? When I try to do again with VB.NET, everything goes well as expected. It's so weird :( . Help me please. I don't have much time left to complete my work.
add function to handle Button_Click event like this:
private void Button1_Click(object sender, System.EventArgs e)
{
Label1.Text = TextBox1.Text;
}
I run this web application, type something in TextBox1, then click button Button1 but nothing happen, Label1 doesn't change! when I debug this, I found that in function Button1_Click, TextBox1.Text is "" !? What happen here? When I try to do again with VB.NET, everything goes well as expected. It's so weird :( . Help me please. I don't have much time left to complete my work.