DayPilot for ASP.NET - AJAX Calendar/Scheduling Controls
Try the online demo: AJAX-style event creating, moving, resizing, and deleting • Context menu • Day view • Work week view • Week view • Month view • Horizontal/vertical resources view • PostBack/AJAX/JavaScript event handling • Binding to XmlDataSource, SqlDataSource, DataTable, ArrayList • Custom event formatting • UpdatePanel compatibility

AfterRender Event

It is possible to send custom data from the CallBack event handler back to the client. This will allow showing custom messages after the event was handled.

Example 1: Sending a simple string

Server-side code (.aspx.cs):

    protected void DayPilotCalendar1_TimeRangeSelected(object sender, TimeRangeSelectedEventArgs e)
    {
        // ... update database

        DayPilotCalendar1.DataBind();
        DayPilotCalendar1.Update("New event created.");
    }

Server-side template (.aspx):

    <daypilot:daypilotcalendar id="DayPilotCalendar1" runat="server" 
        ...
        AfterRenderJavaScript="afterRender(data);"
        ></daypilot:daypilotcalendar>

Client-side code (.aspx):

function afterRender(data) {
    if (data) {
         document.getElementById('messageDiv').innerHTML = data;
    }
}

Example 2: Sending a dictionary

Server-side code (.aspx.cs):

    protected void DayPilotCalendar1_TimeRangeSelected(object sender, TimeRangeSelectedEventArgs e)
    {
        // ... update database

        DayPilotCalendar1.DataBind();

        Hashtable ht = new Hashtable();
        ht["message"] = "Event moved.";
        ht["id"] = e.Value;
        DayPilotCalendar1.Update(ht);
    }

Server-side template (.aspx):

    <daypilot:daypilotcalendar id="DayPilotCalendar1" runat="server" 
        ...
        AfterRenderJavaScript="afterRender(data);"
        ></daypilot:daypilotcalendar>

Client-side code (.aspx):

function afterRender(data) {
    if (data) {
        document.getElementById('messageDiv').innerHTML = data.message + " (id " + data.id + ")";
    }
}

DayPilot Pro is an advanced DayPilot edition. You can check a thumbnail overview of the most interesting features. There is also an online demo with all the features working (including the AJAX features). If you want to test the design-time support and API you can download a fully functional trial version. And if you like it, you can buy a full version with source code and 12 months of upgrades and support (with a 30-days money back guarantee).

DayPilot Lite is a do-it-yourself open-source edition of DayPilot. Although it misses some DayPilot Pro features, there are thousands of developers using it to build calendar, personal scheduling, and resource booking applications.