Category - Model
Results 1 - 5 of 16
18 Nov 2020 18 Nov 2020 0 Comments  123 Views
Here Mudassar Ahmed Khan has explained with an example, how to bind Model Properties in ASP.Net Core Razor Pages.

The value of the Name attribute of the Field e.g. a TextBox is used as the name of the Property and then the Property is decorated with BindProperty attribute which then binds the property to the Field in ASP.Net Core Razor Pages.
17 Nov 2020 17 Nov 2020 0 Comments  147 Views
Here Mudassar Ahmed Khan has explained with an example, how to loop through Model properties using FOR EACH loop in ASP.Net Core MVC.

The Entity Framework will be used to fetch the data from Database and populate the Model class properties.

Then inside the View, using a FOR EACH loop the Model items will be traversed and data will be displayed using HTML Table in ASP.Net Core MVC.
17 Nov 2020 17 Nov 2020 0 Comments  156 Views
Here Mudassar Ahmed Khan has explained with an example, how to perform looping through Model properties in View using FOR EACH loop in ASP.Net MVC Razor.

The Entity Framework will be used to fetch the data from Database and populate the Model class properties.

Finally inside the View, using a FOR EACH loop the Model items will be traversed and data will be displayed using HTML Table in ASP.Net MVC Razor.
17 Nov 2020 17 Nov 2020 0 Comments  118 Views
Here Mudassar Ahmed Khan has explained with an example, how to perform looping through Model Items in ASP.Net Core Razor Pages.

The Model data will be fetched using Entity Framework and then using a FOR EACH loop the Model items will be traversed and data will be displayed using HTML Table in ASP.Net Core Razor Pages.
25 Aug 2020 25 Aug 2020 0 Comments  1370 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.
Results 1 - 5 of 16