---
title: "What is model binding in ASP.NET MVC and how does it work?"  
description: "What is model binding in ASP.NET MVC and how does it work?"  
author: "Revati S Misra"  
published: 2023-06-01  
updated: 2023-06-02  
canonical: https://www.mindstick.com/forum/158590/what-is-model-binding-in-asp-dot-net-mvc-and-how-does-it-work  
category: "asp.net mvc"  
tags: ["asp.net", "asp.net mvc", "mvc"]  
reading_time: 3 minutes  

---

# What is model binding in ASP.NET MVC and how does it work?

What is [model](https://yourviews.mindstick.com/view/81334/america-is-reopening-after-corona-lockdown-but-on-swedish-model) [binding in ASP.NET](https://www.mindstick.com/forum/161642/what-is-model-binding-in-asp-dot-net-core) [MVC](https://www.mindstick.com/forum/155803/define-cache-profile-in-mvc) and how does it work?

## Replies

### Reply by Aryan Kumar

[Model binding](https://www.mindstick.com/forum/160237/explain-razor-view-model-binding-how-does-it-work-and-why-is-it-important) is the process of converting HTTP request data into .NET objects. It is a feature of [ASP.NET MVC](https://www.mindstick.com/forum/155798/what-is-caching-in-asp-dot-net-mvc) that allows you to create .NET objects from data that is submitted by a user through a web form.

Model binding is a two-step process:

1. **Value providers** retrieve values from the HTTP request.
2. **Model binders** create .NET objects from the values that were retrieved by the value providers.

Value providers can retrieve values from a variety of sources, including:

- **Request parameters:** These are the values that are submitted by the user through the web form.
- **Query string parameters:** These are the values that are included in the URL of the request.
- **Cookies:** These are small files that are stored on the user's computer.
- **Session state:** This is a collection of data that is stored on the server for the duration of a user's session.

Model binders are responsible for creating .NET objects from the values that were retrieved by the value providers. Model binders are provided by the ASP.NET MVC framework for a variety of .NET types. For example, there is a model binder for the int type, a model binder for the string type, and so on.

Model binders can also be custom created by developers. Custom model binders can be used to create .NET objects from data that is not supported by the default model binders.

Model binding is a powerful feature of ASP.NET MVC that allows you to create .NET objects from data that is submitted by a user through a web form. Model binding can help you to reduce the amount of code that you need to write, and it can also help you to improve the performance of your application.

Here are some of the benefits of using model binding in ASP.NET MVC:

- **Reduced code:** Model binding can reduce the amount of code that you need to write. This is because model binding automatically converts HTTP request data into .NET objects.
- **Improved performance:** Model binding can improve the performance of your application. This is because model binding does not require you to manually convert HTTP request data into .NET objects.
- **Reusable code:** Model binders can be reused across multiple controllers and views. This can help you to reduce the amount of code that you need to write, and it can also help you to improve the consistency of your application.

Here are some examples of how model binding can be used in ASP.NET MVC applications:

- **Creating a new user:** When a user creates a new account, the user's input data is submitted through a web form. Model binding can be used to create a new User object from the user's input data.
- **Updating a user:** When a user updates their account information, the user's input data is submitted through a web form. Model binding can be used to update the User object that represents the user.
- **Deleting a user:** When a user is deleted, model binding can be used to delete the User object that represents the user.

If you are developing an ASP.NET MVC application, I recommend that you use model binding. Model binding can help you to reduce the amount of code that you need to write, improve the performance of your application, and make your application more reusable.


---

Original Source: https://www.mindstick.com/forum/158590/what-is-model-binding-in-asp-dot-net-mvc-and-how-does-it-work

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
