I have few layers of nesting custom user controls:
RegisterUser.aspx
<%@ .... Inherit="System.Web.Mvc.ViewPage<RegisterUserViewModel>"
...
<%= Html.EditorFor(m => m.Details) %>
...
UserDetails.ascx
<%@ .... Inherit="System.Web.Mvc.ViewUserControl<UserDetails>"
...
<%= Html.EditorFor(m => m.BirthDate) %> <!--BirthDate is of type DateTime-->
...
and I have declared DateTime.ascx in Shared/EditorTemplates
<%@ .... Inherit="System.Web.Mvc.ViewUserControl<dynamic>"
...
<input type="text" id="???" />
...
The question is how to set input id attribute? I know that EditorFor makes some magic for default types. For example if DateTime was of type string, EditorFor will set id of input type to "Details_BirthDate" and the name attribute to "Details.BirthDate". I want to know how it's done? Because I want to use it for my special custom types.