29.05.2015 Views

o_19mgorv9t13a3ko71fev19l81mqa.pdf

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 2-18. Setting the default start URL for the project<br />

You can see the form in the RsvpForm view when you run the application and click the RSVP Now link. Figure 2-19<br />

shows the result.<br />

Figure 2-19. The RspvForm view<br />

Handling Forms<br />

I have not yet told MVC what I want to do when the form is posted to the server. As things stand, clicking the Submit<br />

RSVP button just clears any values you have entered into the form. That is because the form posts back to the RsvpForm<br />

action method in the Home controller, which just tells MVC to render the view again.<br />

50

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!