Newbie question: MVC4
I have a simple editor (simple text):
@Html.EditorFor(m => m.MyField)
@Html.EditorFor(m => m.MyCopyField)
When the user leaves the MyField editor I want the editor of the MyCopyField to have the same text.
How do I paint an ID onto each editor so that I can do this in jQuery?
If
MyFieldis a string,EditorForwill create a textbox using the name of the field as theIDandname:Then you can just use jquery to copy the text.
simple jquery:
http://jsfiddle.net/AfgAG/13/