This section contains the solutions to the thought experiments and answers to the lesson review questions in this chapter.
Objective 3.1: Thought experiment
It looks like malicious users are entering HTML in the text fields. This data gets submitted to the server and rendered the next time the page is viewed.
You need to use regular expressions to restrict the user input. By making clear which characters you allow, you can strip the input of the HTML characters and make sure they are not showing up in the page layout.
Objective 3.1: Review
Correct answer: B
Incorrect: Parse will throw an exception when the user enters an invalid date,, which is not uncommon.
Correct: TryParse will see whether the entered value is a valid date. If not, it will ...