Category - Data Annotation
Results 1 - 20 of 31
02 Jul 2022 02 Jul 2022 0 Comments  177 Views
Here Mudassar Khan has explained with an example, how to enable Data Annotation validation on Client Side in ASP.Net MVC.
02 Jul 2022 02 Jul 2022 0 Comments  140 Views
Here Mudassar Khan has explained with an example, how to implement Server Side validation using Data Annotations in ASP.Net MVC.
02 Jul 2022 02 Jul 2022 0 Comments  177 Views
Here Mudassar Khan has explained with an example, how to perform Client Side validations using Data Annotation attribute in ASP.Net Core MVC.

The Client Side validations will be performed using Model class and Data Annotation attributes.
25 Aug 2020 25 Aug 2020 0 Comments  37914 Views
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.
25 Aug 2020 25 Aug 2020 0 Comments  9092 Views
Here Mudassar Ahmed Khan has explained with an example, how to use ModelState in View for accessing the ModelState.IsValid property in ASP.Net MVC Razor.

The ModelState can be accessed in View using the ViewData object in ASP.Net MVC Razor
25 Aug 2020 25 Aug 2020 0 Comments  5074 Views
Here Mudassar Ahmed Khan has explained with an example, 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.
25 Aug 2020 25 Aug 2020 0 Comments  2669 Views
Here Mudassar Ahmed Khan has explained with an example, how to perform Validation inside Controller i.e. Server Side validation in ASP.Net MVC Razor.

Validations in ASP.Net MVC Razor can be performed on Client Side as well as Server Side using Data Annotation attributes.
21 Aug 2020 21 Aug 2020 0 Comments  5000 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement TextBox Validation using Model in ASP.Net MVC Razor.

The Client Side validations will be performed using Model class and Data Annotation attributes in ASP.Net MVC Razor.
19 Nov 2019 19 Nov 2019 0 Comments  7753 Views
Here Mudassar Ahmed Khan has explained with an example, how to perform Indian PAN Card Number validation using Data Annotations and Regular Expressions on Client Side in ASP.Net MVC Razor.

The Client Side PAN Card Number TextBox validation will be performed using Model class and Data Annotation attributes in ASP.Net MVC Razor.
29 Oct 2019 29 Oct 2019 0 Comments  15842 Views
Here Mudassar Ahmed Khan has explained with an example, how to use multiple Regular Expression (Regex) Data Annotation attributes for validation in ASP.Net MVC Razor.

The validation will be performed on Client Side using Model class and multiple Regular Expression (Regex) Data Annotation attributes in ASP.Net MVC Razor.
29 Mar 2019 29 Mar 2019 0 Comments  18509 Views
Here Mudassar Ahmed Khan has explained with an example, how to use Html.Label and Html.LabelFor helper functions in ASP.Net MVC Razor.
16 Aug 2018 16 Aug 2018 0 Comments  26223 Views
Here Mudassar Ahmed Khan has explained with an example, how to display Validation Summary in ASP.Net MVC Razor.

The Validation Summary will display error messages using the Html.ValidationSummary Html Helper function in ASP.Net MVC Razor.
16 Jul 2018 17 Jul 2018 0 Comments  11232 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement and use the Authorize and AllowAnonymous Data Annotation attributes with Forms Authentication in ASP.Net MVC Razor.
15 Jun 2018 15 Jun 2018 0 Comments  23292 Views
Here Mudassar Ahmed Khan has explained with an example, how to insert Date in dd/MM/yyyy format in SQL Server Database Table using ASP.Net MVC Razor.

This article will illustrate how to insert Date in dd/MM/yyyy format in Database Table using Stored Procedures and the SQL Server DATEFORMAT command in ASP.Net MVC Razor.
15 Jun 2018 15 Jun 2018 1 Comments  31425 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement dd/MM/yyyy Date format validation for TextBox in ASP.Net MVC Razor.

The RegularExpression Data Annotation will be used along with Regular Expression (Regex) for enforcing dd/MM/yyyy Date format validation for TextBox in ASP.Net MVC Razor.
10 Aug 2017 10 Aug 2017 0 Comments  25786 Views
Here Mudassar Ahmed Khan has explained with an example, how to make the Client Side validation implemented using Data Annotations in ASP.Net MVC Razor.

The Client Side validations will be performed using jQuery, Model class and Data Annotation attributes and it needs configuration of Bundles in order to enable Client Side validations.
01 Aug 2017 01 Aug 2017 0 Comments  8336 Views
Here Mudassar Ahmed Khan has explained with an example, how to use Data Annotations attribute for Model validations in ASP.Net MVC Razor.

The Client Side validations will be performed using Model class, Data Annotation attributes and jQuery in ASP.Net MVC Razor.
09 Dec 2016 09 Dec 2016 0 Comments  37462 Views
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.
08 Dec 2016 08 Dec 2016 0 Comments  27582 Views
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.
02 Dec 2016 02 Dec 2016 0 Comments  70014 Views
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.
Results 1 - 20 of 31