theJYC / c-sharp_form_debug

Refactoring C# form to send a system-generated email receipt upon form submission

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C# Web Form Debugging

This repository illustrates a problem-solving process concerning an interactive web form that, upon submit, sends a couple of system-generated emails from noreply@buncombecounty.org to the end user and the webmaster.

Directory Map

The repository is organised as the below tree structure:

root
│   README.md
│   original.cs
│   annotated.cs    
│
└───solutions
│   │   solution1.cs
│   │   solution2.cs
│   │   solution3.cs
│   │   solution4.cs
│   │   suggestion.cs
│

Index

  • original.cs: The original code snippet that has been provided as the problematic code.
  • annotated.cs: Line-by-line analysis of original.cs, illustrated by multi-line comments to demonstrate the problem-solving process.
    • N.B. Skip to /*[4]*/ for problem identification.
  • solutions: Directory that holds the four possible solutions to fix the problem. At the top of each file is a brief summary of the solution, with its advantage and disadvantages outlined.
    • N.B. solution4.cs is my optimal solution, and each solution build on the previous one.
  • suggestion.cs: A bonus piece to illustrate a potential area of improvement in the code, in order to improve UX.

About

Refactoring C# form to send a system-generated email receipt upon form submission


Languages

Language:C# 100.0%