Category - Data Annotation
Results 21 - 40 of 48
25 Aug 2020 25 Aug 2020 0 Comments  41405 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  9842 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 04 Aug 2022 0 Comments  5418 Views
Here Mudassar 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 04 Aug 2022 0 Comments  2947 Views
Here Mudassar 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  5881 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  8095 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  16607 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  19832 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  27449 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  11924 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  24100 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  32670 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  26604 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  8443 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  38912 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  28571 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  72096 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.
02 Dec 2016 02 Dec 2016 1 Comments  64159 Views
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.
26 Nov 2016 26 Nov 2016 0 Comments  19769 Views
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.
22 Nov 2016 22 Nov 2016 0 Comments  31378 Views
Here Mudassar Ahmed Khan has explained with an example, how to create Password TextBox using Html.TextBoxFor in ASP.Net MVC Razor.
Html.TextBoxFor cannot create Password TextBox and hence Html.PasswordFor Helper function needs to be used.
This article will also explain how to perform Client Side validation for Password TextBox using Model class and Data Annotation attributes in ASP.Net MVC Razor.
Results 21 - 40 of 48