Basic calculator is a mobile-first ASP.NET WebForms application with a clean, intuitive UI for basic arithmetic (+, -, *, /), optional whole-number rounding, and a scrollable history of your last 10 calculations. The application is also unit tested to ensure reliability and correctness.
🚀 Available at: https://afsddafs.bsite.net/
- Mobile-First Design: Fully responsive layout, usable on phones and desktops.
- Basic Operations:
+,-,*,/with divide-by-zero handling. - Rounding: Optionally round results to the nearest whole number.
- Calculation History: Stores last 20 calculations in a SQL Server database and displays the 10 most recent.
- Layered Architecture: Clear separation of concerns:
- Presentation: ASPX + code-behind
- Services: ComputeService & CalculationService
- Data Access: IDataAccess with Dapper implementation
Desktop View
Mobile View
- Framework: .NET Framework 4.7.2 (ASP.NET WebForms)
- Language: C#
- Data Access: Dapper
- Logging: Serilog
- Unit Testing: MSTest, Moq
- Database: SQL Server
- IDE: Visual Studio 2022
- Enter two numbers in the input fields.
- Check Use whole numbers to round the result to whole numbers.
- Click one of the operation buttons (
+,-,*,/). - View the result in Results and the recent history in History.
- Logs are written daily under
App_Data/Logs.
The application handles common errors gracefully and informs the user without crashing.
- Divide by zero triggers a clear user-facing message.
- Invalid input (e.g., text instead of number) results in a friendly error display.
- Migrate UI to ASP.NET MVC or Blazor
- Refactor logging (Serilog)
- Dark mode
- Mobile app



