Here Mudassar Khan has explained how to implement Server Side TextBox validation using Model in ASP.Net MVC Razor.
The Server Side validations will be performed using Model class and Data Annotation attributes in ASP.Net MVC Razor.
Chapters:
00:00 Introduction
00:20 Setting Required Data Annotation attribute
01:00 Adding Form in View
01:27 Adding Label for the TextBox
01:44 Adding the TextBox
01:58 Adding ValidationMessage element for error message
02:55 Adding POST Action method in Controller
04:00 Displaying ViewBag message
05:05 Demo
Blog: http://aspsnip.pet/3109
Code: http://aspsnip.pet/3109?code
Q&A: http://aspsnip.pet/3109?ask
Author: http://aspsnip.pet/3109/?author
Follow us on:
Facebook: http://aspsnip.pet/FB
Instagram: http://aspsnip.pet/IG
Twitter: http://aspsnip.pet/TW
#TextBox #Validation #DataAnnotation #ServerSide #MVC #ASP.Net
Similar Articles:
Validation inside Controller (Server Side validation) in ASP.Net MVC
Using ModelState in View in ASP.Net MVC
What is ModelState.IsValid and how to use it in ASP.Net MVC
Implement Server Side validation using Data Annotations in ASP.Net MVC
Server Side validation using Data Annotations in ASP.Net MVC