T
TJS
found this code but get error message on handles
Compiler Error Message: BC30506: Handles clause requires a WithEvents
variable.
can anyone help resolve this ??
============================================
'Just drag calendar control onto the screen and turn it invisible.
'When you click a button, like "Get Date" or a picture of a calendar, turn
it visible:
Private Sub calTo_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles calTo.Click
Me.Calendar2.Visible = True
Me.Calendar2.BackColor = White
End Sub
'Then when you select a date, store it in a text box, check an option
button,
turn the calendar invisible and store the date in the session object for
'future use such as when you return to the page for a 2nd search.
Private Sub Calendar1_SelectionChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged
Me.txtDateFrom.Text = Me.Calendar1.SelectedDate.ToShortDateString
Me.optFrom.Checked = True
Me.Calendar1.Visible = False
Session("txtDateFrom") = txtDateFrom.Text.ToString
End Sub
============================================
Compiler Error Message: BC30506: Handles clause requires a WithEvents
variable.
can anyone help resolve this ??
============================================
'Just drag calendar control onto the screen and turn it invisible.
'When you click a button, like "Get Date" or a picture of a calendar, turn
it visible:
Private Sub calTo_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles calTo.Click
Me.Calendar2.Visible = True
Me.Calendar2.BackColor = White
End Sub
'Then when you select a date, store it in a text box, check an option
button,
turn the calendar invisible and store the date in the session object for
'future use such as when you return to the page for a 2nd search.
Private Sub Calendar1_SelectionChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged
Me.txtDateFrom.Text = Me.Calendar1.SelectedDate.ToShortDateString
Me.optFrom.Checked = True
Me.Calendar1.Visible = False
Session("txtDateFrom") = txtDateFrom.Text.ToString
End Sub
============================================