Content area
Full Text
In the old days (which in the IS field is a few months), we're sure many of you attempted to construct some sort of online calendar. On Web pages, this probably entailed creating a table and calculating the number of days in the month, deciding whether it's a leap year, etc. Unless you borrowed the routines from somewhere else, it ended up being quite a bit of work, didn't it? Well, then, Microsoft was thinking of you when it created a great calendar-like control called MonthView. Not only does MonthView take care of creating the GUI interface for you; it supports many different events that make it truly interactive.
In this article, we'll show you how to incorporate this great control into your Web page. We'll also use some VBScript to manipulate dates in order to populate it. After setting just a few parameters, the MonthView control takes care of the rest. Figure A shows the page we'll construct in this article after simply adding the control and just a few lines of script. You'll be amazed at just how easy it is to use. In addition to being a great way to display date information graphically on a page, it's also a great way to solicit date input from users. We'll talk about all these possibilities later in this article.
MonthView properties
First, be sure you've registered the control successfully. If you're using Visual Studio, the control is found in the file Mscomct2.ocx, which is usually located in your Windows/ System directory, if you've installed Visual Studio correctly. In Visual InterDev 6.0, you can use the Customize Toolbox feature to add it to your available list...