随笔分类 - ASP.NET MVC
摘要:开始以为ASP.NET没有令牌功能, 打算把php里的移植过来的, 都快写完了才发现原来ASP.NET里有… 好吧, 不说废话了, 进入主题!!!! 在form标签内加入: @Html.AntiForgeryToken() 在form action 的方法加上 [ValidateAntiForgeryToken] 没有令牌的表单提交会报错, 这个自己试试就知道了~
阅读全文
摘要:情况是这样的, 慢慢听我道来~新建了一个MVC 3的项目, 在HomeController中继承BaseControllerCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using System.Web.Mvc; 6 using System.Web.
阅读全文
浙公网安备 33010602011771号