i have view, controls trying render using uihint data annotation attributes.
for string properties in model, have used uihint("textbox") , added textbox.cshtml in shared/editortemplates folder, working fine , shows desired textbox want txt.js.
i followed same way show datetime control (jquery widget datetime picker). have used uihint("dfdatetime") datetimeoffset properties in model , added dfdatetime.cshtml in shared/editor templates folder.
getting exception: model item passed dictionary of type 'system.datetimeoffset', dictionary requires model item of type 'system.string'.
i dont know why error coming, can advise?
i dont know why error coming, can advise?
use appropriate model type in dfdatetime.cshtml
template:
@model datetimeoffset ...
Comments
Post a Comment