ASP.NET MVC 4 and ContextDependentView -
i have started playing beta , discovered bit of black magic in there. when @ _loginpartial.cshtml
line builds register link says:
@html.actionlink("register", "register", "account", routevalues: null, htmlattributes: new { id = "registerlink", data_dialog_title = "registration" })
the link rendered on browser says /account/register
. however, form in register view renders action /account/jsonregister
based on viewbag.formaction
value. value set? have suspicion it's contextdependentview
returned register
action can't quite figure out how or why.
any ideas please?
the real magic in ajaxlogin.js file, modifies link add content=1 querystring parameter used in contextdependentview decide whether send json form or regular form.
this jquery stuff people don't bother at.
Comments
Post a Comment