Tutorial search
Tutorials
Stuff
Affiliates
Photoshop Templates
ASP.NET Calendar example - ASP.NET tutorial


This is an example of a calendar control. In this example whatever date you select it will appear on the label.
Step 1
First of all, Open Microsoft Visual Studio and create a new website ( File->New->web Site ).
Step 2
Here you can write the name of your website. By default it is website1, website2 etc.
Step 3
Design window - Here we can design our page.
Step 4
Insert a Calendar component: open toolbox->Double click on Calendar.
Step 5
Now add a label from the tool box.
Step 6
Now it’s time to add some code to the calendar.
Step 7
This is the coding written on date_selected event. And Label1.text =”Selected Date Is”+calender1.selecteddate.toshortdatestring ();
Step 8
Now run your project.
Step 9
When you click on a date within the calendar the label will show the date which you have selected. See the picture below.
Step 10
As you can see that label is showing the date of the calendar.


