Link to home
Start Free TrialLog in
Avatar of Silas2
Silas2

asked on

LogonModel Question

I'm using MVC 4, and I have hacked the logon/account stuff a bit to implement the old forms login, but all of a sudden the LogonModel seems to be null, or rather the line
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control notAsTall" })

Open in new window

is throwing a null exception.
Its made me question where the LogonModel was getting instantiated anyway as the controller (out-of-the-box) just returns View()
ASKER CERTIFIED SOLUTION
Avatar of ambience
ambience
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Silas2
Silas2

ASKER

What I've become curious about is where the LogOnModel is instantiated.
I see the other Action with two params, but I'm testing with another app I've got with an older scaffold/mvc framework and the param-less one is still instantiating the LogOnModel.
Is it instantiated in the pipeline before it reaches the controller?