Calendar to show dates?

Posted on 2006-05-29
Last Modified: 2010-04-16
If I have a table in a DB and it have the entries

userid username dateofbirth
1 paul 28/7/1945
2 jon 22/5/1946
3 peter 20/7/1942

How would I have a calendar control have it show the text 'peter was born today' (on the 20/7/1942) etc etc when I scroll trough the calendar?

Question by:amoran
    LVL 5

    Accepted Solution

    One way you can do it is use MonthCalendar with another control like a textbox (or anything you like).  Just Handle the DataChanged event on the MonthCalendar then use the date the retrieve the user's birthday from database for that day.  Once you have it, you can update the textbox to show the user's name.

    You can read this thead for how to use DateChanged event:


    LVL 6

    Assisted Solution

    LVL 12

    Expert Comment

    And this one does exactly what you are asking for, if I understand you right.  Complete code (look at the bottom of the page)

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video discusses moving either the default database or any database to a new volume.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now