Basically I have a bunch of submission forms that gather data in a generic way -> serialize the input / value pairs to a CSV file. I'd like to add new submission pages without having to write a new controller action (the idea being I wouldn't have to compile and deploy a new assembly). So, here's my thinking:
http://foobar.com/Submission/Contact
http://foobar.com/Submission/Apply
both should route to the SubmissionController.Handle() method. The Handle method will show the view for the appropriate action:
return View("Contact");
// or
return View("Apply");
The views would both have their form's actions as "/Submission/Handle" and the controller would have:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Handle(FormCollection inputs)
So a) how do I route both the actions Contact and Apply to Handle and b) how do I query from within the SubmissionController for the action name so I can do:
var viewName = GetActionName();
return View(viewName);
Obviously I'm a n00b to ASP.NET MVC ... so if there's a better method, please let me know.