I'm coming from web forms and still very new to MVC. I want to create a contact form that simply emails me the contact information,
e.g:
- FirstName
- LastName
- Age
- Company
I need to collect about a dozen different fields of information.
In web forms it was easy to build the email body just by calling TextBox.Text
What's the best way to build the email body besides having to pass in a long-ass parameter:
[HttpPost]
Public ActionResult Contact(string firstName, string lastName, string Email, int Age, string Company, ...)
{
// ...
}
Thank you in advance.