什么是ModelState.IsValid? [英] what is ModelState.IsValid?

查看:77
本文介绍了什么是ModelState.IsValid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在控制器中的函数开头有:ModelState.IsValid

为什么总是FALSE?

谢谢!!!

At the beginning of the function in the controller has: ModelState.IsValid
Why is it always FALSE?
thank you!!!

推荐答案

你真的需要拿一本关于MVC的书。这是一个基本概念,你不会在论坛环境中得到完整的答案。



阅读这个 [ ^ ]获得了不错的解释。为了更好的一个,并涵盖MVC的所有基础知识,拿起一本书并完成它。
You seriously need to pickup a book on MVC. This is a basic concept that you're not going to get a complete answer on in a forum environment.

Read this[^] for a decent explanation. For an even better one, and covering all the basics of MVC, pick up a book on it and work through it.


这篇关于什么是ModelState.IsValid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆