Category - Data Annotation
Results 1 - 5 of 14
Here Mudassar Ahmed Khan has explained with an example, how to pass and show Exception (Error) message from Controller to View in ASP.Net MVC Razor.
The Exception (Error) message will be displayed from Controller to View using Html.ValidationSummary Html Helper function in ASP.Net MVC Razor.
Here Mudassar Ahmed Khan has explained with an example, how to add (apply) CSS Class (Styles) in Html.ValidationMessageFor Helper method in ASP.Net MVC Razor.
The Html.ValidationMessageFor Helper method has a parameter named htmlAttributes which is used for adding (applying) CSS Class (Styles) to the displayed validation message.
Here Mudassar Ahmed Khan has explained with an example, how to perform Mobile Number (Cellphone Number) TextBox validation i.e. exact Ten Numbers (Digits) validations using Data Annotations and RegularExpressions (Regex) on Client Side in ASP.Net MVC Razor.
A Mobile Phone Number (Cellphone Number) is a numeric value with exact ten (10) digits and such validation can be achieved using the RegularExpression Data Annotation attribute in ASP.Net MVC Razor.
Here Mudassar Ahmed Khan has explained with an example, how to perform Decimal TextBox Validation i.e. Decimal Number with maximum up to two decimal places validation using Data Annotations on Client Side in ASP.Net MVC Razor.
The Client Side Decimal TextBox Validation i.e. Decimal Number with maximum up to two decimal places validation will be performed using Model class and RegularExpression Data Annotation attribute in ASP.Net MVC Razor.
Here Mudassar Ahmed Khan has explained with an example, how to compare (match) values of Model Properties using Data Annotations in ASP.Net MVC Razor.
Results 1 - 5 of 14