C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » ASP.NET WebForms »

birthday comparing todays date


Posted Date: 12 Dec 2008    Resource Type: Code Snippets    Category: ASP.NET WebForms
Author: rajesh singhMember Level: Gold    
Rating: 1 out of 5Points: 3



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)



  • Responses


    No responses found. Be the first to respond and make money from revenue sharing program.

    Feedbacks      
    Popular Tags   What are tags ?   Search Tags  
    Sign In to add tags.
    Comparing todays date  .  

    Post Feedback


    This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
    You must Sign In to post a response.
    Next Resource: CombSort Function in VB
    Previous Resource: Retrive Data from database in aspx file using Stored Procedure and class file
    Return to Discussion Resource Index
    Post New Resource
    Category: ASP.NET WebForms


    Post resources and earn money!
     
    Related Resources



    dotNet Slackers

    About Us    Contact Us    Privacy Policy    Terms Of Use