O'Reilly logo

ASP.NET Developer's JumpStart by Ken Getz, Paul D. Sheriff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Calendar Control

If you want to allow a user to select a date, displaying a calendar is the right way to do it. You could fashion your own calendar using an HTML table and a lot of scripting code (many developers have done this, in many different ways), but it's a lot of effort. Fortunately, ASP.NET handles this effort for you. The Calendar control, shown in Figure 22.2 (see the sample page CalendarControl.aspx) displays a neatly formatted, bindable table-like view that provides for almost any “look” you need. (Actually, if you view the source for the page containing the Calendar control in the browser, you'll see that it actually is an HTML table, albeit a somewhat complex one.)

Figure 22.2. Use the Calendar control to select a date.

The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required