drewgeezmoe
Member
- Joined
- Feb 8, 2007
- Messages
- 9
- Programming Experience
- Beginner
I tried using this code, but the error message does not show
Thank you for the help
VB.NET:
Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
Dim StrScript As String
Dim mm As String = drpMonth.SelectedItem.Text '--my value here is 9
Dim dd As String = drpDay.SelectedItem.Text '--my value here is 1
Dim yy As String = drpYear.SelectedItem.Text '--my value here is 2007
Dim Bday As Date = mm & " / " & dd & " / " & yy & " " & "12:00:00"
Dim timedifference As Long
timedifference = DateDiff(DateInterval.Second, Bday, Now)
If timedifference < 0 Then
StrScript = "<script language='javascript'>"
StrScript &= vbCrLf & "alert('The birthday you entered is greater than the current date');"
StrScript &= vbCrLf & "</script>"
End If
End Sub