windows forms [Resolved]

Posted by kishore_guruju-3194 under C# on 2/2/2010 | Views : 1623 | Status : [Member] | Replies : 5
hi guys, am new to windows forms ...

if i created a form contains some textboxes and datetimepicker control and one button control. Then i entered some data to textboxes and change the datetimepicker value, now i want to clear the textboxes and get the datetimepicker default value in same form when i click the button(named clear). so i cleared the textboxes by using the code like(in button click event)

textbox1.text=string.empty;
textbox2.text=string.empty;

then how to get the default value of the datetimepicker control ?




Responses

Posted by: Bubbly on: 2/2/2010 [Member] Bronze

Up
0
Down

Resolved
Hello,

dateTimePicker1.Value = DateTime.Today;


++
Thanks & Regards,
Deepika

kishore_guruju-3194, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bubbly on: 2/2/2010 [Member] Bronze

Up
0
Down
Hello,

DateTime myDate = dateTimePicker1.Value;


++
Thanks & Regards,
Deepika

kishore_guruju-3194, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: kishore_guruju-3194 on: 2/2/2010 [Member] Starter

Up
0
Down
hi i tried but its not worked..

kishore_guruju-3194, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: kishore_guruju-3194 on: 2/2/2010 [Member] Starter

Up
0
Down
Hi, Thanks it works.......
It helps a lot for me....

kishore_guruju-3194, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bubbly on: 2/2/2010 [Member] Bronze

Up
0
Down
Welcome!! You can mark it as answered if your query is solved..

++
Thanks & Regards,
Deepika

kishore_guruju-3194, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response