摘要:
@RenderSection("bscript", false) //false表示不是必须填充填充bscript占位符 @section bscript{} 阅读全文
posted @ 2014-05-22 14:49
编程猴子
阅读(636)
评论(0)
推荐(0)
摘要:
@Html.Label("Label", "Label") @*渲染成Label*@@Html.Hidden("Hidden","Hidden") @*渲染成 *@@Html.TextBox("TextBox", "TextBox", new { color="red",font="2",size=... 阅读全文
posted @ 2014-05-22 00:30
编程猴子
阅读(603)
评论(0)
推荐(0)
摘要:
HttpUtility.HtmlEncode来预处理用户输入,这能阻止用户向视图中用链接注入js代码或html标记1、[Required]:非空验证2、[StringLength(**)]:设置字符的长度2.1、[StringLength(**,MinimumLength=*):设置字符长度Mini... 阅读全文
posted @ 2014-05-22 00:29
编程猴子
阅读(243)
评论(0)
推荐(0)
摘要:
@model MvcApplication1.Models.ViewClass @{ ViewBag.Title = "View2"; } @******引用这两个js实现客户端的验证********@viewdata无法跨控制传值 ViewData: @ViewData["View1"]TempD... 阅读全文
posted @ 2014-05-22 00:23
编程猴子
阅读(282)
评论(0)
推荐(0)
摘要:
@{ ViewBag.Title = "ajax"; }@using (@Html.BeginForm()) { @Ajax.ActionLink("这是一个ajax请求", "ajax", new AjaxOptions{ UpdateTargetId = "ajaxId", //Insertio... 阅读全文
posted @ 2014-05-22 00:22
编程猴子
阅读(153)
评论(0)
推荐(0)
摘要:
@{ ViewBag.Title = "主页"; } 这里就是渲染Body啦.~~不需要写神马<asp:Content />,其实因为RenderBody()不在有歧义. @ViewBag.Message 若要了解有关 ASP.NET MVC 的更多信息,请访问 htt... 阅读全文
posted @ 2014-05-22 00:19
编程猴子
阅读(167)
评论(0)
推荐(0)