Hi,
I need your help.
On my aspx page I have set the Panel3.
This Panel3 can be visible or hidden according to the needs of the user connected to the web page.
If Panel3 is visible I have to set the variables txDay and txtCloseDay with the current date else with the values of txDay.Text and txtCloseDay.Text
But I have error
'System.DateTime' does not contain a definition for 'Text'
on this line
txDay = Convert.ToDateTime(txDay.text);
This is my test code
DateTime txDay;
DateTime txtCloseDay;
if (Panel3.Visible == false)
{
txDay = DateTime.Today;
txtCloseDay = DateTime.Today;
}
else
{
txDay = Convert.ToDateTime(txDay.text);
txtCloseDay = Convert.ToDateTime(txtCloseDay.text);
}
Any suggestion?