Category - Data Annotation
Results 1 - 20 of 28
25 Aug 2020 25 Aug 2020 0 Comments  22222 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  5290 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  3658 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  2112 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  2529 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  6153 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  12558 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  14192 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  23236 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  8811 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  19805 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  27026 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  21849 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  7747 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  32986 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  22795 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  61260 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  56827 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  16290 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  28502 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 1 - 20 of 28