Click here to Skip to main content
15,881,424 members
Articles / Web Development / ASP.NET

Event Calendar for an ASP.NET MVC Application

Rate me:
Please Sign up or sign in to vote.
4.83/5 (49 votes)
5 Feb 2018GPL35 min read 313.7K   15.9K   127  
The article explains how to integrate dhtmlxScheduler, an AJAX-based, interactive event calendar, in your ASP.NET MVC application.
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" ContentType="text/xml" %>
<data>
    <% foreach (var myevent in Model) { %>
        <event id="<%=myevent.id%>">
            <start_date><![CDATA[<%=    String.Format("{0:MM/dd/yyyy HH:mm}",myevent.start_date) %>]]></start_date>
            <end_date><![CDATA[<%=      String.Format("{0:MM/dd/yyyy HH:mm}",myevent.end_date) %>]]></end_date>
            <text><![CDATA[<%=          myevent.text%>]]></text>
        </event>
    <% } %>
</data>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer (Senior)
Russian Federation Russian Federation
Building web apps since 2001. Rich experience in HTML frontends for different platforms.

Comments and Discussions