Jul 08, 2015, 5:33 PM
Ext.Net.MVC: How to prevent default field Id with "For" suffixed fields?
Hello,
Fields with "For" suffix like TextFieldFor, DisplayFieldFor set id which equals model field name. It isn't comfortable because I have 2 different forms with identical models on one page (I see controls only from one form because elements in dom model should have unique id).
I've found the solution:
Is there a better solution to override field ID?
Edited
I've found default parameter setId = true. It would be nice if default value will be false.
Fields with "For" suffix like TextFieldFor, DisplayFieldFor set id which equals model field name. It isn't comfortable because I have 2 different forms with identical models on one page (I see controls only from one form because elements in dom model should have unique id).
I've found the solution:
Html.X().DisplayFieldFor(m => m.Name).ID("")
, but empty id looks very unclear.Is there a better solution to override field ID?
Edited
I've found default parameter setId = true. It would be nice if default value will be false.
Last edited by Daniil; Aug 21, 2015 at 9:50 AM.
Reason: Please use [VAR] tags