Implementing logic into the Presentation layer.
Perhaps one of the best features provided by MVC is the ability to implement logic into the UI to control output.
To illustrate this feature, I’ll begin where my MVC: Action Methods using GET & POST article left off.
As you can see, I’ve updated my View to determine the associate’s territory for the purpose of displaying a specific message to them.
In their territory is California (and our company is in the Pacific Northwest), then obviously they miss the sun!
Also, it might be helpful to display the current data when they view this page in case they print it out.
Now when I complete the form and receive the confirmation message, I’m greeted with a message about the sun and the current date.