Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Maintains classic ASP.NET on .NET Framework (Web Forms, legacy MVC) and plans incremental migration toward ASP.NET Core.
Use this skill ↓95% 91%−5 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 21 of 22 without it.
3 of 3 safety checks passed
This document provides patterns for maintaining and stabilizing classic ASP.NET applications on .NET Framework.
Extract business logic from code-behind and controllers into standalone classes:
// Before: Logic embedded in code-behind
public partial class OrderPage : Page
{
protected void SubmitOrder_Click(object sender, EventArgs e)
{
var order = new Order();
order.CustomerId = int.Parse(CustomerIdField.Text);
order.Total = CalculateTotal();
// validation, persistence, notification all inline
}
}
// After: Logic in a service class
public class OrderService
{
public OrderResult SubmitOrder(OrderRequest request)
{
// validation, persistence, notification encapsulated
}
}
Benefits:
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.