in the following post: http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-4-custom-object-templates.html
<%= Html.Editor(prop.PropertyName) %>
Html.Editor creates a text field with the name generated by MVC. How do I get / access this name? identifier?
So in my code this is generated:
<input type="text" value="Right" name="Template.RightColumn.ContainerName" id="Template_RightColumn_ContainerName">
and I want to generate this:
<div id="Template_RightColumn_ContainerName"></div>
so I need to access the PropertyId. how am i doing this
thank
I found him. you can use them:
<%: ViewData.TemplateInfo.HtmlFieldPrefix %>
or
<%: ViewData.TemplateInfo.GetFullHtmlFieldId("HtmlContent") %>
where HtmlContent is the name of your field. the prefix will be generated automatically. thank
Source: https://habr.com/ru/post/1783187/More articles:Odd coding pattern on release of UIAlertView - iosPython 64-bit DLL server error on Windows 7 64-bit server - pythonhow to write .htaccess redirection as stackoverflow does for its questions - .htaccessLoading an external page (containing ajax) via ajax - jquerygetting rid of redundant type parameters - c #Monitoring IO as ProcMon Sysinternals - filesystemsConverting decimal time representation to the unix era - cCombine ontology with Protege-OWL API - protegeUse Clojure cells or add an observer for a reactive program? - clojureRails Clone records - cloneAll Articles