Q:

JQuery can't set value of html input control

I have an MVC4 app using the Twitter API in which I must set certain values in a Javascript function after an AutoComplete (KendoUI) returns a value.  The lookup is working fine, and I'm able to set one of two values but the javascript method can't set the value of the second, it's being ignored.  I've tried a number of things, such as setting the readonly attribute to false, setting the value, then setting readonly back to true.  I also tried removing the readonly attribute from the html markup completely.  Still it's ignoring the change.  The only difference is in how the fields are declared in the html.
The field that is being set successfully is EntityID, EntityName is being ignored.
Here's the markup for the fields, followed by the javascript method:
<div class="row">
    <!-- EntityID -->
    <span class="col-sm-2">
        <label>Entity ID:</label>
    </span>
    <span class="col-sm-3">
        @Html.TextBoxFor(model => model.EntityID, new { @class = "form-control" })
    </span>
    <span class="col-sm-7"></span>
</div>

<div class="row">
    <!-- EntityName -->
    <span class="col-sm-2">
        <label>Entity Name:</label>
    </span>
    <span class="col-sm-8">
        <input type="text" class="form-control" id="EntityName" 
            style="background-color:lightcyan;"                                  
            value="@Model.EntityName" />
    </span>
    <span class="col-sm-2"></span>
</div>

Here is the javascript method:
function onWOChange(e) {
    // this event will fire more than once, first on selection of a value from the AutoComplete list
    // then when the AutoComplete control loses focus.  The second time around, the task variable
    // will be null as it was parsed from the AutoComplete select list (a necessary hack) in the 
    // first iteration.  Do not set the WorkTaskNumber field or perform the AJAX lookup on the
    // second iteration.

    //alert('onChange event for workorderid autocomplete has fired');

    var workOrderTask = $("#WorkOrderID").val();
    var parms = workOrderTask.split('-');
    var task = parms.length == 1 ? null : parms[1];

    // parse the task from the workorder id and populate the workorder/task fields
    $('#WorkOrderID').val(parms[0]);
    if (task != null) {
        $('#WorkTaskNumber').val(task);
    }

    // don't try the AJAX lookup if task variable is null
    if (task != null) {
        // look up the entity for the selected work order and populate the entity id/name fields
        $.post('@Url.Action("LookupEntityByWorkOrderTask", "Home")', {
            workOrderID: parms[0],
            taskID: task
        }, function (data) {
            if (data.error) {
                // process error
                alert('Entity lookup error ' + data.val);
            } else {
                // update entity values
                $("#EntityID").val(data.EntityID);

                //$("#EntityName").attr('readonly', false);

                try {
                    $("#EntityName").val(data.EntityName);
                } catch (e) {
                    alert('error' + e);
                }
                //$("#EntityName").attr('readonly', true);

            }
        });
    }

A:

OK, I figured this out.  It's the downside of using Html helpers.  It turns out I inadvertently had two controls on the form with identical names.  This happened because EntityName is not to be modified by the user.  The data is required in the POST and it's also required to display to the user.  If the user changes other values on the form the entity can change therefore the entity number and name must be updated.  
I had a Html.HiddenFor control where the ID was set for me under the covers by the helper (EntityName).  For the display control, I had to go to raw html markup because the Html.TextboxFor in the Twitter Bootstrap context truncates display values (not sure why, but it must be something in the CSS, which if I did find it I would not want to change anyhow).  I set the ID for that field manually.  Actually, this duplication would have also occurred had I used the TextboxFor and been harder to find.
Since the display control is read-only, I still have to have the duplicate hidden field or the data doesn't go back to the server in the POST.  If anyone knows a slick way around this I would love to hear about it.
Thanks to those who made suggestions!

