We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add the EJMVC Schedule control in the MVC application?

The following steps help manually add the EJMVC Schedule control into the new MVC 5 application.

  1. Create the MVC 5 application in the Visual Studio.
  2. Add references of the necessary assemblies to your project as depicted in the following screenshot.

Figure 1:Necessary assembly reference

  1. Add the necessary assembly information in the root web.config file.

[Web.config]

<compilation debug="true" targetFramework="4.5.1" >

      <assemblies>

        <add assembly="Syncfusion.EJ, Version=13.2450.0.29, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />

        <add assembly="Syncfusion.EJ.Mvc, Version=13.2500.0.29, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />

      </assemblies>

    </compilation>

  1. Add the namespaces in the root Web.config page as follows.

[Web.config]

<pages>

      <namespaces>

        <add namespace="System.Web.Helpers" />

        <add namespace="System.Web.Mvc" />

        <add namespace="System.Web.Mvc.Ajax" />

        <add namespace="System.Web.Mvc.Html" />

        <add namespace="System.Web.Optimization" />

        <add namespace="System.Web.Routing" />

        <add namespace="System.Web.WebPages" />

        <add namespace="Syncfusion.JavaScript" />

        <add namespace="Syncfusion.MVC.EJ" />

      </namespaces>

</pages>

  1. Also, add the following highlighted namespaces in the Web.config page available under the Views/Shared folder of your project.

[Web.config]

<namespaces>

        <add namespace="System.Web.Mvc" />

        <add namespace="System.Web.Mvc.Ajax" />

        <add namespace="System.Web.Mvc.Html" />

        <add namespace="System.Web.Optimization"/>

        <add namespace="System.Web.Routing" />

        <add namespace="ScheduleMVCSample" />

        <add namespace="Syncfusion.JavaScript" />

        <add namespace="Syncfusion.MVC.EJ" />

</namespaces>

  1. Add the necessary scripts and theme files in the sample application as depicted.

Figure 2: Adding necessary themes

Figure 3: Adding necessary scripts

  1. Add references to the required scripts and stylesheets in the layout.cshtml page as follows.

[Layout.cshtml]

  1. Set the UnobtrusiveJavaScriptEnabled property to false in the web.config page as follows.

[Web.config]

<appSettings>

    <add key="webpages:Version" value="3.0.0.0" />

    <add key="webpages:Enabled" value="false" />

    <add key="ClientValidationEnabled" value="true" />

    <add key="UnobtrusiveJavaScriptEnabled" value="false" />

    <add key="vs:EnableBrowserLink" value="false" />

  </appSettings>

  1. Add the script manager render code at the end of the body tag in the layout.cshtml page as mentioned in the following code example. It is mandatory for rendering the EJMVC Schedule control.

[Layout.cshtml]

  1. To render the Schedule control, add the schedule code in the view page as follows.

[Index.cshtml]

  1.  After running the above code, the Schedule control is displayed as follows.

Figure 4: Schedule control

 

Sample Link

ScheduleSampleManual

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
3606 01/29/2015 08/27/2015 ASP.NET MVC Schedule
Tags:
Did you find this information helpful?
Comments
Michael Jul 05, 2016
Great article, but where do you get the source code files from?
Reply
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon