I've created a partial view named "_ColorWheel.cshtml" which a string that holds the HEX value of the color.
This is the base model
public class PageComponentModel
{
// .....
public string BgColorVal { get; set; }
}
This model inherits PageComponentModel
public class OneColumnComponentModel: PageComponentModel
{
// ....
}
On their respective views, I use the same line @Html.Partial("_ColorWheel",Model.BgColorVal)
to create the control. The view of OneColumnComponentModel works well, but PageComponentModel's throws
The model item passed into the dictionary is of type '.....Model.PageComponentModel', but this dictionary requires a model item of type 'System.String'.
I've tried multiple times to copy and paste the line just in case of typos or whatnot. Setting a breakpoint in razor shows that BgColorVal is string and has the correct value.