birthday comparing todays date
Code Behind
The Sample Code is a Small Function to check wether Birthday is greater than todays date.
If Trim(txtBirthDate.Text) = "" Then
Else
Dim textboxdate As Date = Convert.ToDateTime(txtBirthDate.Text).Date
Dim todaysdate As Date = DateTime.Now.Date
If textboxdate >= todaysdate Then
datelabel.Visible = True
datelabel.Text = "Birth date must Not be greater than today's Date"
flag = False
End If
End If
Code in front
< td width="68%" align="left" style="width: 510px" >
< div id="datediv" runat="server" visible="true" class="validation3" >
< asp:Label ID="datelabel" runat="server" Visible="True" > < /asp:Label >
< /div >
< /td >