你好我正在尝试对我的表单进行验证,并且我获得了这个错误!验证表单时出错?
错误10类型或命名空间名称DataAnnotations'不存在命名空间中的“System.ComponentModel” (是否缺少程序集 参考?)
我怎样才能解决这个问题?
我使用“using System.ComponentModel.DataAnnotations;”在其他模型,做工精细...
,但我有这等型号:
public class CompuViewModel
{
public List<Compu> PackageCompu { get; set; }
}
public class Compu
{
public int Id { get; set; }
public string Name { get; set; }
}
我试图把在各个领域[Require]
,但引发错误!
有什么想法?
组装......你有装配引用System.ComponentModel? – Brandon