Seems like you are mislead by wrong analogy. HiddenFor
corresponds exactly to the <input type="hidden"/>
tag. Just like TextBoxFor
, CheckBoxFor
etc. These methods are not designed to use templates. DisplayFor
/EditorFor
on the other side are specially created to be used with templates defined in the project. Thus what you are asking for is not possible out-of-the-box.
However you can always define your own overload for HiddenFor
with whatever set of parameters and whatever logic you might require.