How to disable element prefix in asp.net mvc2 template? Should I use Partial Control Instead?
1 Answer
To answer my own question, this line of code removes the hierarchical prefix from the element name..
<% ViewData.TemplateInfo.HtmlFieldPrefix = ""; %>
<%= Html.EditorFor(model => model.Description) %>
1 Comment
UpTheCreek
But won't that remove the prefix on everything? What if you only wanted to affect one field?