So far I've seen demos of MVC that have simple pages, one for login, one for register, one for listing a table ...
In order to understand better the transition for WebForms developers into MVC patterns, I would like to understand how can I put together multiple CONTROLS (like the one provided by the default MVC project that VS2010 creates for us ...and make it work.
OK so as an example, imagine we want to change the LogonUserControl.ascx to allow us to login (so to show UserName and Password textboxes and Logon button) from the Home Page.
1) We update the Control as follow:
2) We update the HomeController.cs file to handle the Logon Button Post event as follow:
We needed to move some code from AccountController to HomeController in order to get the control to work under the Index view. So ...with little luck it seems to work !!!
Now the problem happens when you navigate to the Register view, considering that now we are not any longer on the HomeController "domain" but we are under AccountController.
Register page shows perfectly and
View Complete Post