public class HelloWorldController : RenderMvcController
{
public ActionResult Index(ContentModel model)
{
CustomModel cm = new CustomModel();
cm.Id = 1;
cm.Name = "Test";
return CurrentTemplate(model.Content);
}
This throws a cast error when my template is rendered.
Custom model in Umbraco 8
Template code:
I cant get access to any property under 'm'
Controller code
This throws a cast error when my template is rendered.
Why is this?
try
@Html.LabelFor(m=> Model.XXXX)
is working on a reply...