Event Calendar with Day/Week/Month Views (ASP.NET Tutorial)

A new tutorial shows how to create a toolbar for switching the event calendar views (day, week, month) in ASP.NET WebForms.
Nov 15, 2013
event calendar asp.net day week month

This new tutorial shows how to create a toolbar for switching the event calendar views (day, week, month):

event calendar asp.net toolbar

It uses a simple JavaScript helper (DayPilot.Switcher) to integrate the views (which are created using DayPilot Calendar and Month controls) with the toolbar and the Navigator control.

<script type="text/javascript">
    var switcher = null;

    $(document).ready(function () {
        switcher = new DayPilot.Switcher();

        // dp_day is ClientObjectName of DayPilotCalendarDay
        switcher.addButton("toolbar_day", dp_day);  

        // dp_week is ClientObjectName of DayPilotCalendarWeek
        switcher.addButton("toolbar_week", dp_week); 

        // dp_month is ClientObjectName of DayPilotMonth1
        switcher.addButton("toolbar_month", dp_month);  

        // dp_navigator is ClientObjectName of DayPilotNavigator1
        switcher.addNavigator(dp_navigator);  

        switcher.show(dp_day);
    });

</script>

A sample project is available for download.

  • Visual Studio 2010 or higher
  • SQL Server 2008 (Express) or higher
  • C# project with source code
  • VB project with source code
  • DayPilot Pro Trial version included
  • Integrated modal dialog for event creating and editing

See also a similar tutorial for ASP.NET MVC: