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

Image export (BMP, PNG, GIF, JPG)

A new server-side Export() method is available:

  • It's a method of DayPilotCalendar (i.e. no special control required).
  • It supports all main bitmap image formats: PNG, GIF, JPG, BMP... (all formats supported by Bitmap.Save()).

Advantages:

  • Print the exported image easily.
  • Save the exported image to a file.
  • Non-web applications:
    • Show a read-only calendar in WebForm applications
    • Include it in PDF files generated on the server
    • Include it in generated e-mails

Usage modes:

  • Special page: Put DayPilotCalendar (with the same configuration as on the dynamic page) on a special page and overwrite the Response stream in all cases.
  • PostBack: Use a button on an existing page and overwrite the Response stream in the button Click event handler (returns the image after clicking a button).
  • Desktop/server/console applications: Create the control dynamically and export the image from any other kind of application.

Signatures:

public MemoryStream Export(ImageFormat format);
public MemoryStream Export(ImageFormat format, int scrollPosition);

Example:

    protected void ButtonExport_Click(object sender, EventArgs e)
    {
        int hourHeight = DayPilotCalendar1.CellsPerHour*DayPilotCalendar1.CellHeight;

        Response.Clear();
        Response.ContentType = "image/png";
        MemoryStream img = DayPilotCalendar1.Export(ImageFormat.Png, 9 * hourHeight);
        img.WriteTo(Response.OutputStream);
        Response.End();

    }

See also

 

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.