Welcome to the FoxLearn
Today we will learn how to create a contact form
First, You need to download Client Contact Form Flat Responsive Widget Template from W3Layouts website,
then unzip and copy to the MVC Demo Project
You need to create a contact class with the corresponding fields in your contact template
You need to add a contact property to the application db context class
then run add-migration command to create the contact table
We will create a contact controller, then add a create action to the contact controller
You need to create an instance to application db context
Right click on Index action, then add view to the Index action
You need to create actions with HttpGet and HttpPost to create method
Right click on create action, then add view to the create action
Copy your contact template to create view, then change the path of css and javascript in create view
To play the demo, you should add a contact link to ShareLayout
Thank you for watching this video