随笔分类 -  MVC

摘要:Razor Syntax Reference Implicit Razor expressions @DateTime.Now @DateTime.IsLeapYear(2016) @await DoSomething("hello", "world") Explicit Razor expressions Last week this time: @(DateTime.Now - TimeS... 阅读全文
posted @ 2016-07-14 09:29 自然去留 阅读(452) 评论(0) 推荐(0)
摘要:Model Binding Below is a list of model binding attributes: •[BindRequired]: This attribute adds a model state error if binding cannot occur. •[BindNever]: Tells the model binder to never bind to thi... 阅读全文
posted @ 2016-06-14 09:47 自然去留 阅读(275) 评论(0) 推荐(0)
摘要:1 /// <summary> 2 /// 3 /// </summary> 4 public class AjaxOnlyAttribute : ActionFilterAttribute 5 { 6 /// <summary> 7 /// Called by the ASP.NET MVC fr 阅读全文
posted @ 2015-06-13 15:49 自然去留 阅读(312) 评论(0) 推荐(0)