上一页 1 2 3 4 5 6 7 ··· 13 下一页
摘要: 1、Inline Helper Method 2、External Helper Method return String.Format("This is the message: {0}", msg); 3、Creating Form Elements 4、Input Helpers ... 阅读全文
posted @ 2014-07-06 18:11 秋意了了 阅读(255) 评论(0) 推荐(0) 编辑
摘要: Control [ChildActionOnly] //只能用于Child Action public ActionResult Time() { return PartialView(DateTime.Now); } View @model DateTime The time is: @Mod... 阅读全文
posted @ 2014-07-06 11:35 秋意了了 阅读(272) 评论(1) 推荐(0) 编辑
摘要: @Html.Partial("MyPartial") @Html.Partial("MyStronglyTypedPartial", new [] {"Apple", "Orange","Pear"}) //强类型 阅读全文
posted @ 2014-07-06 11:29 秋意了了 阅读(117) 评论(0) 推荐(0) 编辑
摘要: @RenderSection("Header") @section Header { @foreach (string str in new [] {"Home", "List", "Edit"}) { @Html.ActionLink(str, str, null, new { style = "margin: 5px" }) ... 阅读全文
posted @ 2014-07-06 11:27 秋意了了 阅读(256) 评论(0) 推荐(0) 编辑
摘要: Authentication过滤器是第一个执行的过滤器,但其也是在控制器实例化后执行。 如果不使用Session,可以禁用 比如一些无需权限等公共界面,可以禁用Session,以提高效率。 阅读全文
posted @ 2014-07-05 20:06 秋意了了 阅读(120) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/mzwhj/category/295227.html 阅读全文
posted @ 2014-07-03 21:06 秋意了了 阅读(106) 评论(0) 推荐(0) 编辑
摘要: The ActionFilterAttribute class implements both the IActionFilter and IResultFilter interfaces. This class is abstract, which forces you to provide an implementation. The AuthorizeAttribute and ... 阅读全文
posted @ 2014-07-03 20:51 秋意了了 阅读(126) 评论(0) 推荐(0) 编辑
摘要: If the MVC Framework cannot find a value for a reference type parameter (such as a string or object), the actionmethod will still be called, but using... 阅读全文
posted @ 2014-07-03 13:28 秋意了了 阅读(195) 评论(0) 推荐(0) 编辑
摘要: try { WebMail.SmtpServer = "smtp.example.com";WebMail.SmtpPort = 587;WebMail.EnableSsl = true;WebMail.UserName = "mySmtpUsername";WebMail.Passwor... 阅读全文
posted @ 2014-06-19 16:40 秋意了了 阅读(327) 评论(0) 推荐(0) 编辑
摘要: public class GuestResponse { [Required(ErrorMessage = "Please enter your name")] public string Name { get; set; } [Required(Er... 阅读全文
posted @ 2014-06-19 16:18 秋意了了 阅读(360) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 13 下一页