I am trying to set up a simple login html page, whose action is sent to mvc controller on another of my sites. I have no problem setting up the page to do the post, and in the mvc controller I have my method that reads the form post. The problem is that I am not seeing my fields from the html form in the form collection.
Is there something special that I need to do to read a form post within a mvc controller method, if so what is that?
The is the form action markup from my page
<form action="http://reconciliation-local.sidw.com/login/launch" method="post"> User Name <input type="text" id="username"/><br/> Password <input type="text" id="password"/> <input type="submit" value="launch"/> </form> The controller method
[HttpPost] public ActionResult launch(FormCollection fc) { foreach (string fd in fc) { ViewData[fd] = fc[fd]; } return View(); } When I step through the controller method code, I am not seeing anything in the formcollection parameter.