【问题标题】:fullcalendar in VB.Net ASP MVCVB.Net ASP MVC 中的完整日历
【发布时间】:2017-01-19 01:40:04
【问题描述】:

我尝试使用全日历制作调度程序。我找不到使用 vb.net 的教程。所以我按照本教程A complete web diary system for jQuery and C# MVC 将c# 代码转换为vb.net。但我无法显示日历。我已将 fullcalendar.js 添加到我的脚本文件夹中,并将 fullcalendar.css 添加到内容文件夹中。但结果什么也没显示。一个空白页。这是我的html代码:

<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>

【问题讨论】:

  • 你搞定了吗?
  • 您还只是得到一个空白页吗?控制台有错误吗?

标签: asp.net-mvc vb.net fullcalendar


【解决方案1】:

您需要在页面上包含 CSS 和 JS。仅将它们添加到文件夹中可能还不够。

  • 将它们包含在_Layout.cshtml 中(这使得它们在所有页面上都可用)
  • 将它们包含在当前视图中(仅限本页)

例子:

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

你还有一个未关闭的&lt;div class="row"&gt;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-06-30
    • 1970-01-01
    • 1970-01-01
    • 2015-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多