简体   繁体   中英

fullcalendar in VB.Net ASP MVC

I try to make a scheduler using fullcalendar. I cannot find a tutorial that use vb.net. So i follow this tutorial A complete web diary system for jQuery and C# MVC by converting c# code into vb.net. But i have problem to display the calendar. I have added fullcalendar.js to my scripts folder and fullcalendar.css into content folder. But the result shows nothing. A blank page. This is my html code:

<div class="row">
<div id='calendar' style="width:65%"></div>
<script>
    $(document).ready(function () {
        $('#calendar').fullcalendar({
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,agendaWeek,agendaDay'
            },
            defaultView: 'agendaDay',
            editable: true,
            allDaySlot: false,
            selectable: true,
            slotMinutes: 15,
        });
    })
</script>

You need to include the CSS and JS on the page. Just adding them to the folders is probably not enough.

  • Include them in _Layout.cshtml (which makes them available on all pages)
  • Include them in the current view (this page only)

Example:

<link href="@Url.Content("~/Content/fullcalendar.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/fullcalendar.js")" type="text/javascript"></script>

Also you have an unclosed <div class="row">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM