Witam, jak wyświetlić cenę w "Price" kiedy wybiorę dla przykładu książkę w dropdownliście? Pracuję z EF6 database first.


@model Orders.Models.Orders
@{
ViewBag.Title = "Create";
}
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<h2>Create</h2>
<br />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="container body-content">
<div class="col-sm-6">
<div class="form-group">
@Html.LabelFor(model => model.IDProduct, "Product:", htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.DropDownList("Product", ViewBag.IDProduct as SelectList, "-- Select Product --", new { @Class = "form-control", @onchange = "myFunction()" })
</div>
</div>
<br /><br />
<div class="form-group">
@Html.LabelFor(model => model.Price, "Price:", htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Price, new { htmlAttributes = new { @class = "form-control", @id = "PriceForm", disabled = "disabled" } })
</div>
</div>
<br /><br />
<div class="form-group">
@Html.LabelFor(model => model.Quantity, "Quantity:", htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Quantity, new { htmlAttributes = new { @class = "form-control", @id = "price" } })
</div>
</div>
<br /><br />
<div class="form-group">
@Html.LabelFor(model => model.Sum, "Sum:", htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Sum, new { htmlAttributes = new { @class = "form-control" } })
</div>
</div>
</div>