随笔分类 - MVC
摘要:参考资料:http://hi.baidu.com/honfei/item/bc621794b30559f0291647ad在 ASP.NET MVC3 中的属性验证中,前边我们已经介绍了基本的方法,大家可以参考ASP.NET MVC3 实例(六) 增加、修改和删除操作(一),我将对 ASP.NET MVC3 中一些实用的方法或技术做一些集中的学习整理,如本篇CompareAttribute 属性的使用。前边我们在总结属性验证时看到了非空验证、长度验证,下边就让我们看看使用 CompareAttribute 来验证两个属性是否相等。如我们有一个"Password"的属性,还有
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace Mvc2App.Tools { public static class HtmlHelpers { public static string SubString(this HtmlHelper html,string InputStr,int Count) { if (InputStr.Length < C...
阅读全文

浙公网安备 33010602011771号