Hi i am trying to set the value for @Html.EditorFor?
Here is my editor:
@Html.EditorFor(model => model.Customer.CustomerName)
And here is how im trying to set it:
document.getElementById("CustomerName").value = UserInfo.CustomerName;
I get the error message, cannot call method getElementById of undefined.
The id of the field is probably like this:
Look at the generated markup to get the real
idof your input field.