I have windows form containing tab control, having two tab pages
on form load event i passed value to datetimpicker1 exists on tab page 2
private void Form1_Load(object sender, EventArgs e)
{
dateTimePicker1.Text = "2014-05-14 00:00:00.000";
}
and on check button click event i have following code
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show(dateTimePicker1.Value.ToString());
MessageBox.Show(dateTimePicker1.Text.ToString());
}
output:
2)on navigating to tabpage2 & then click on check button
output:
& then after come back to tabpage1 & click on check it shows correct output
why it not showing at first time as we open form & clcik on check button without going to tab page 2
Your suggestions will be appreciated.