Quantcast
Channel: ASPSnippets RSS Feed
Viewing all articles
Browse latest Browse all 4693

What is ModelState.IsValid and how to use it in ASP.Net MVC

$
0
0
Here Mudassar Ahmed Khan has explained with an example, how to use ModelState.IsValid property in ASP.Net MVC Razor. ModelState.IsValid property is an inbuilt property of ASP.Net MVC which verifies two things: 1. Whether the Form values are bound to the Model. 2. All the validations specified inside Model class using Data annotations have been passed. ModelState.IsValid property can be used to perform some logical operations based on the values submitted by the User.

Viewing all articles
Browse latest Browse all 4693

Trending Articles