Category - Model
Results 1 - 20 of 21
07 Jan 2022 07 Jan 2022 0 Comments  633 Views
ASP.Net  XML  MVC  Model  Core
Here Mudassar Khan has explained with an example, how to read (parse) XML file in ASP.Net Core MVC.

The XML file will be read and the fetched XML records will be parsed and displayed in Grid (HTML Table) format in View using Model in ASP.Net Core MVC.
15 Apr 2021 15 Apr 2021 0 Comments  3354 Views
ASP.Net  MVC  Model
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) Model data to Action method with data using QueryString Parameters in ASP.Net MVC Razor.

When a Button is clicked, the Model object is populated with values and passed (sent) to the RedirectToAction method along with the name of the Controller and its Action method in ASP.Net MVC Razor.
10 Apr 2021 15 Apr 2021 0 Comments  10607 Views
ASP.Net  MVC  Button  Form  Model
Here Mudassar Ahmed Khan has explained with an example, how to redirect to Action method with Model data in ASP.Net MVC Razor.

When a Button is clicked, the Model object is populated with values and passed to the RedirectToAction method along with the name of the Controller and its Action method in ASP.Net MVC Razor.
14 Mar 2021 14 Mar 2021 0 Comments  3662 Views
Here Mudassar Ahmed Khan has explained with an example, how to bind CheckBox (multiple CheckBoxes) using Model in ASP.Net MVC Razor.

The Database data will be populated in generic list collection of Model class and then the Model will be sent to the View where it will be bound to the CheckBox in ASP.Net MVC Razor.
15 Jan 2021 15 Jan 2021 0 Comments  3888 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass Model data from Controller to View in ASP.Net Core MVC.

The data from the SQL Server Database will be fetched using Entity Framework and populated into Model which will be later sent to the View in ASP.Net Core MVC.
18 Nov 2020 18 Nov 2020 0 Comments  6331 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  6552 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  8133 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  4204 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  22227 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  5292 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  3659 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.
21 Aug 2020 21 Aug 2020 0 Comments  2530 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.
06 Jan 2020 06 Jan 2020 0 Comments  4825 Views
ASP.Net  MVC  Form  Model  Core
Here Mudassar Ahmed Khan has explained with an example, how to pass (get) data from View to Controller in ASP.Net MVC Core 2.1.

This article will explain how to create Form Fields using Model class and then pass (get) data from View to Controller using Model class object in ASP.Net MVC Core 2.1.
24 May 2019 24 May 2019 2 Comments  22933 Views
Here Mudassar Ahmed Khan has explained with an example, how to store Model in Session inside Controller and display in View in ASP.Net MVC Razor.

This article will illustrate how to save Model object in Session variable inside Controller and then access it using Razor syntax inside View in ASP.Net MVC Razor.
21 Jan 2019 21 Jan 2019 0 Comments  15301 Views
Here Mudassar Ahmed Khan has explained with an example, how to retrieve (display) data from Database in TextBoxes in ASP.Net MVC Razor.

The data (records) from Database will be fetched using Entity Framework and will be displayed in TextBoxes created using Model class in ASP.Net MVC Razor.
27 Nov 2018 27 Nov 2018 0 Comments  27178 Views
ASP.Net  MVC  Form  Model
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) Model to Controller using Html.BeginForm helper function in ASP.Net MVC Razor.

This article will explain how to create Form Fields using Model class and then pass (send) Model data to Controller using Html.BeginForm helper function in ASP.Net MVC Razor.
27 Nov 2018 27 Nov 2018 1 Comments  28159 Views
ASP.Net  MVC  Form  Model
Here Mudassar Ahmed Khan has explained with an example, how to POST (Submit) a Form without using Model in ASP.Net MVC Razor.

This article will illustrate how to POST (Submit) a Form using Html.BeginForm helper function and Form Collection in ASP.Net MVC Razor.
23 Nov 2018 23 Nov 2018 0 Comments  3534 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) Form Collection and Model values same time to Controller in ASP.Net MVC Razor.

This article will also illustrate how to get values of TextBox created using Html.TextBox helper function using Form Collection and the TextBox created using Html.TextBoxFor helper function using Model inside Controller in ASP.Net MVC Razor.
24 Aug 2018 24 Aug 2018 0 Comments  34108 Views
Here Mudassar Ahmed Khan has explained with an example, how to bind (populate) DropDownList from ViewModel in ASP.Net MVC Razor.

The DropDownList will be populated from database using Model class and the Html.DropDownListFor Helper method.
Results 1 - 20 of 21