Articles → ASP.NET CORE → Page Model In ASP.NET Core
Page Model In ASP.NET Core
Purpose
Benefit Of The Page Model
- Since business logic and UI elements are in separate files, maintaining the code is simpler.
- It offers developers the flexibility to work separately on views and page models.
- The page model class enables automated unit testing.
How Is The Page Model Specified In The View?
Click to Enlarge
Click to Enlarge
Method To Write Business Logic
- OnGet
- OnPost
- OnPut
public void OnGet() {
}
public void OnPut() {
}
public void OnPost() {
}
| Posted By - | Karan Gupta |
| |
| Posted On - | Tuesday, June 1, 2021 |