Im trying to get the @item.Id sent to the JavaScript function with @onChange. But when I write it like the code below then the JavaScript function reads it as a plain text.

Razor page:

```
<table class="table-striped">

    <thead>
        <tr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <th class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
                <i class="fa fa-sort" title="Blocknummer"></i>
            </th>
            <th class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <i class="fa fa-tag" title="Namn på block"></i>
            </th>
            <th class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
                <i class="fa fa-clock-o" title="Längd på block"></i>
            </th>
            <th class="col-lg-5 col-md-5 col-sm-5 col-xs-5">
                <i class="fa fa-user" title="Extern aktör"></i>
            </th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model.CourseBlocks)
            {
            <tr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <td class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
                    @Html.DisplayFor(m => item.BlockOrder)
                </td>
                <td class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                    @Html.DisplayFor(m => item.BlockName)
                </td>
                <td class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
                    @Html.DisplayFor(m => item.DisplayLength)
                </td>
                <td class="col-lg-5 col-md-5 col-sm-5 col-xs-5">
                    @if (item.NeedExternActor)
                    {
                        @Html.DropDownListFor(model => item.ExternActorId, new SelectList(Model.ContactPersons, "Value", "Text"), new { @class = "form-control form-control-280 input-sm", @onChange = "actorChange('@item.Id', this.options[this.selectedIndex].value)" })
                    }
                </td>
            </tr>
        }
    </tbody>

</table>

```

JavaScript:

```
function actorChange(id, value) {

var itemId = id;
var actorId = value;
}

```

Thanks in advance for all help I can get.