DayPilot Knowledge Base

AJAX Calendar/Scheduling Controls
DayPilot Pro (AJAX Calendar Control)
» DayPilot ASP.NET Calendar
DayPilot Pro (AJAX Monthly Calendar Control)
» DayPilot ASP.NET Monthly Calendar
DayPilot Pro (AJAX Scheduler Control)
» DayPilot ASP.NET Scheduler
DayPilot » Knowledge Base » DayPilot and ViewState

DayPilot and ViewState

Last revision: May 16, 2012

By default, all main DayPilot controls (CalendarMonth, and Scheduler) store the property values in ViewState.

You can disable the ViewState for the whole page in the page header:

<%@ Page Language="C#" MasterPageFile="~/Demo.master" AutoEventWireup="true" CodeFile="Default.aspx.cs"

You can also disable it for DayPilot only:


Storing events in ViewState

Since DayPilot Pro for ASP.NET WebForms 6.2 events are not stored in ViewState by default.

You can change the behavior using StoreEventsInViewState property:


It is not recommended to store events in the ViewState because it increases the size of both the request and response and increases the server load.

ViewState and performance

If you are seeing performance issues, on of the things to try is to disable the ViewState.

If you need to keep ViewState enabled, you can consider compressing the POST requests (Scheduler).

See also

Consequences of disabled ViewState

If you disable the ViewState, you need to keep in mind that the property changes will be lost after PostBacks.

You can safely disable ViewState if you are using only CallBack event handling. CallBacks use independent mechanism for synchronization of (selected) DayPilot properties and don't use ViewState information.


How to make the Calendar events read-only
Events not showing up in the Scheduler
How to improve speed of the Scheduler (when showing many events)
DayPilot Calendar control doesn't show any events