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 >


Attachments

  • birthday comparing todays date (23824-12138-birthday comparing todays date.txt)
  • Comments

    No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: