'object' does not contain a definition for 'Action'

0

I'm using MVC 5 with Identity to login, this error appeared so far that I could not find a solution.

Error happens in view _ExternalLoginsListPartial.cshtml

    
asked by anonymous 16.09.2014 / 16:43

1 answer

0

The error is probably in the place where the partial view call is being passed, which is passing an object that does not have the Action property to the _ExternalLoginsListPartial.cshtml view.

Probably on your _ExternalLoginsListPartial.cshtml you are getting a dynamic model like this:

@model dynamic

And referring to the Model.Action property, and the Action property does not exist on the object you are passing from your controller to your partial-view.

return View(objeto_que_nao_possui_action);

or

 @Html.Partial("_ExternalLoginsListPartial", objeto_que_nao_possui_action)

Being objeto_que_nao_possui_action is the object to be investigated.

    
16.09.2014 / 17:03