Posted 09 Jul 2013 Link to this post
Posted 11 Jul 2013 Link to this post
The dropdownlist does not use the DataSourceResult and expects a collection e.g.
public
ActionResult UsuarioRead()
{
IQueryable<Usuario> products = CashControl.Usuario;
var rest = products.Select(n =>
new
idUsuario = n.idUsuario,
nombre = n.nombre,
nombreUsuario = n.nombreUsuario,
email = n.email
});
return
Json(rest, JsonRequestBehavior.AllowGet);
}