Let's now implement the "Add New Product" form
post functionality of our site. We'll ultimately want users to see a
screen like below when they visit the /Products/New URL:
Figure 13

Form input and editing scenarios are typically
handled in the ASP.NET MVC Framework by exposing two Action methods on a
Controller class. The first Controller Action method is responsible for
sending down the HTML containing the initial form to display. The second
Controller action method is then responsible for handling any form submissions
sent back from the browser.
For example, for our "Add Product"
screen above we could choose to implement it across two different
ProductsController actions: one called "New" and one called
"Create". The /Products/New URL would be responsible for displaying
an empty form with HTML textboxes and drop-down list controls to enter new
product details. The HTML <form> element on this page would then
have its "action" attribute set to the /Products/Create URL.
This means that when the user presses a form submit button on it, the form
inputs will be sent to the "Create" action to process and update the
database with.
Figure 14
