I am trying to work with the calender control and have a sub routine that I am running when the user clicks a date in the calender.
Here is my code and what I am trying to do is seperate the month,day, and year that they have choosen.
Sub Date_selected(sender as Object,e as EventArgs)
Label1.text="The selected date is " & Calendar2.SelectedDate.ToShortDateString()
label2.text= month(Calendar2.SelectedDate.ToShortDateString())
label3.text= day(Calendar2.SelectedDate.ToShortDateString())
label4.text= year(Calendar2.SelectedDate.ToShortDateString())
End Sub
I get an error saying that Reference to a non-shared member requires an object reference
any ideas???
Here is my code and what I am trying to do is seperate the month,day, and year that they have choosen.
Sub Date_selected(sender as Object,e as EventArgs)
Label1.text="The selected date is " & Calendar2.SelectedDate.ToShortDateString()
label2.text= month(Calendar2.SelectedDate.ToShortDateString())
label3.text= day(Calendar2.SelectedDate.ToShortDateString())
label4.text= year(Calendar2.SelectedDate.ToShortDateString())
End Sub
I get an error saying that Reference to a non-shared member requires an object reference
any ideas???