You will start with the basics of your surface controller.
Add a new controller that inherits from Umbraco.Web.Mvc.SurfaceController. The naming convention is that you append the name with SurfaceController.
You will use the surface controller to render your form by building a model and returning a partial view.
Back in Visual Studio, right click on the Controllers folder and add a new controller.
Name it ContactFormSurfaceController and choose for an empty MVC controller.
Instead of inheriting from System.Web.Mvc.Controller, you will inherit from Umbraco.Web.Mvc.SurfaceController.
In the index methods, you will return a partial view. Your view name is ContactForm, and you will pass a new ContactFormViewModel, which is in your first surface controller project.
If you now run your project, and go to the Back Office, you should be able to call this partial. Remove the static HTML.
Replace it with the following code:
Go back to your Contact page. The Contact form still looks the same. But, if you make changes to your ContactForm partial view, and save them, the Contact form will use the partial view.
Adding forms to your site using SurfaceControllers, learn the basics in this chapter