摘要: 1、Model2、HomeController3、CreatePerson.cshtml禁用了客户端验证4、Using Templated Helper MethodsEditor 和 EditorFor 是一样的,唯一的区别是EditorFor有只能提示,可以防止输入错误(?) The type ... 阅读全文
posted @ 2014-07-06 22:10 秋意了了 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑