Forms + ASP.NET MVC = Confusing for me:
What are the preferred ways to setup your controller action for form posts?
- Do I need to specify an attribute that has [AcceptVerbs(HttpVerbs.Post)]?
- Should the controller action take a "FormCollection" or should I use ModelBinders?
- If I should use ModelBinders, how?
How do I setup the form in the view?
- Should I use the Html helpers like Html.BeginForm/Html.EndForm or simply specify the form tag myself?
- How do you specify the controller and action to be used in a form (with either the Html helpers or with a manual form tag)?
Can somebody please show me both a simple view with a form ~and~ its corresponding controller action?
I'm trying to write a form with a single textbox that I can submit to the Home/Create action and pass the string from the textbox to it.