Parameter Type ViewModel to httpget Asp

0

Good attempt to pass as a parameter to an Action of type HttpGet but this arrives as null:

public ActionResult Create(clsGuiaMovimientoVM oFil)

but if I send only primitive data, they arrive correctly:

public ActionResult Create(string NombreFile, string ActionReturn, string ControllerReturn)

and if I add the model to this last line of code, the same one arrives as null:

public ActionResult Create(string NombreFile, string ActionReturn, string ControllerReturn, clsGuiaMovimientoVM oFil)

I do not understand why this happens, if with the POST method the model arrives correctly:

  [HttpPost]
  [ValidateAntiForgeryTokenAttribute()]
  public ActionResult Create(clsGuiaMovimientoVM oGuiaVM)
    
asked by carlos 17.12.2018 в 13:42
source

0 answers