您现在的位置是:网站首页> 编程资料编程资料
Asp.net MVC scheduler的实现方法详解_实用技巧_
2023-05-24
320人已围观
简介 Asp.net MVC scheduler的实现方法详解_实用技巧_
Asp.net MVC scheduler的实现方法详解
本例使用了fullcalendar js : https://fullcalendar.io/
1. view :
@{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Layout.cshtml"; } @section PageContent{
} @section scripts{ } 2. Web api controller :
... public ActionResult GetJsonData() { ... var tasks = //...logic of getting tasks ... var jsonObjs = tasks.Select(x => new FullCalendaRecord() { title = x.Subject, url = "the url", start = ..., end = x.TargetDate.Value.ToString("yyyy-MM-dd"), }).ToList(); return Json(jsonObjs, JsonRequestBehavior.AllowGet); } public class FullCalendaRecord { // sample data: //[ //{ // title: 'Click for Google', // url: 'http://google.com/', // start: '2017-09-28', // end:'2017-09-28' //} //] public string title { get; set; } public string url { get; set; } public string start { get; set; } public string end { get; set; } } ... 如有疑问请留言或者到本站社区交流讨论,感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
您可能感兴趣的文章:
相关内容
- Asp.net mvc验证用户登录之Forms实现详解_实用技巧_
- 详解ASP.NET Core 中的框架级依赖注入_实用技巧_
- WPF图片按钮的实现方法_实用技巧_
- 浅谈ASP.NET Core 2.0 带初始参数的中间件(译)_实用技巧_
- 浅谈ASP.NET Core 2.0 中间件(译)_实用技巧_
- .NET发送邮件遇到问题及解决方法_实用技巧_
- ASP.NET Core 2.0 带初始参数的中间件问题及解决方法_实用技巧_
- ASP.NET页面之间传值的方式之Application实例详解_实用技巧_
- asp.net mvc webapi 实用的接口加密方法示例_实用技巧_
- 使用重绘项美化WinForm的控件_实用技巧_
