Help on Error: Cannot bind source type RedTechNet.XYZ.Model.Cliente to model type Umbraco.Web.Models.RenderModel
Hi,
in the last version of Umbraco ( before not ), we have this error when passing custom model from surface controller to the view.
The error appear when post data.
Cannot bind source type RedTechNet.XYZ.Model.Cliente to model type Umbraco.Web.Models.RenderModel
This is my code:
Controller
public ActionResult InserisciCliente()
{
var model = new RedTechNet.XYZ.Model.Cliente();
return View("CNPNuovoCliente");
}
[HttpPost]
public ActionResult InserisciCliente(RedTechNet.XYZ.Model.Cliente model)
{
return View("CNPNuovoCliente", model);
}
public class Cliente
{
public int Id
{
get; set;
}
public string CodiceFiscale
{
get; set;
}
public DateTime CreatedDateCliente
{
get;
set;
}
public string CodiceAgenzia
{
get; set;
}
public string Cognome
{
get; set;
}
public string Nome
{
get; set;
}
public DateTime DataNascita
{
get; set;
}
public string LuogoNascita
{
get; set;
}
public Collaboratore Collaboratore
{
get; set;
}
public List<Pratica> Pratiche
{
get; set;
}
}
Help on Error: Cannot bind source type RedTechNet.XYZ.Model.Cliente to model type Umbraco.Web.Models.RenderModel
Hi, in the last version of Umbraco ( before not ), we have this error when passing custom model from surface controller to the view.
The error appear when post data.
Cannot bind source type RedTechNet.XYZ.Model.Cliente to model type Umbraco.Web.Models.RenderModel
This is my code:
Controller
View:
PartialView:
Model:
Why? Thank you.
Did you ever solve this? I am having this same issue.
Hi, I solved with two simple workaround.
.
is working on a reply...