Getting the Form Values
Next, you add code that processes the form. In outline, you'll do the following:
Check whether the page is being posted (was submitted). You want to your code to run only when users have clicked the button, not when the page first runs.
Get the values that the user entered into the text boxes. In this case, because the form is using the POST verb, you get the form values from the Request.Form collection.
Insert the values as a new record in the Movies database table.
At the top of the file, add the following code: