What is a Calendar control and how do I use it?

The Calendar control is used to display the calendar year on a web page. You can view dates or select a specific day, week or month. The default event of the Calendar control is Selection Changed event that is called when a selection is made on the control.

Drag a calendar control and a textbox from the toolbox. We will display the date selected from the calendar control in the textbox.

The sample code for that is:

Private Sub Calendar1_SelectionChanged (ByVal sender As System.Object, ByVal_
                                e As System.EventArgs) Handles Calendar1.SelectionChanged
TextBox1.Text = Calendar1.SelectedDat
End Sub


In Runtime Mode - Select a date from the calendar control. That date will now be the .Text Value of the textbox.

Written by Sandeep Mogulla, Webmaster at www.startvbdotnet.com

Index

 
Printer friendly version of the FAQ-ASPNET-Calendar-Control page


Sponsored links

Villanova University Six Sigma & IT Certificate Programs
100% Online programs in Six Sigma, IS Security, CISSP Prep, Business Analysis, Proj. Mgmt. and more!
ASP.NET 3.5 Hosting on Windows 2008!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!
SFTP components for .NET
Add complete SSH and SFTP support to your .NET framework application
PureCM Software Configuration Management
Version control and integrated issue tracking - powerful and easy to use. Get your FREE trial now!
Virtual File System SDK
Create your own file systems in Windows and .NET applications

Advertisement



Free Magazine

Free Magazines
eWeek The essential technology information source for builders of e-business.... subscribe now

Newsletter | Submit Content | About | Advertising | Awards | Contact Us | Link to us |
© 1996-2008 Community Networks Ltd All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Synchron Data - .NET development.