How to multiply values of two textboxes in Asp.net MVC
<p>I have 3 textboxes, 1st for Quantity, 2nd for Price and 3rd for Total Price.</p>

<pre><code> &lt;div class="form-group"&gt;
            @Html.LabelFor(model =&gt; model.quantity, htmlAttributes: new { @class = "control-label col-md-2" })
            &lt;div class="col-md-10"&gt;
                @Html.EditorFor(model =&gt; model.quantity, new { htmlAttributes = new { @class = "form-control", @type = "number" } })
                @Html.ValidationMessageFor(model =&gt; model.quantity, "", new { @class = "text-danger" })
            &lt;/div&gt;
        &lt;/div&gt;

        &lt;div class="form-group"&gt;
            @Html.LabelFor(model =&gt; model.price, htmlAttributes: new { @class = "control-label col-md-2" })
            &lt;div class="col-md-10"&gt;
                @Html.EditorFor(model =&gt; model.price, new { htmlAttributes = new { @class = "form-control", @type = "number" } })
                @Html.ValidationMessageFor(model =&gt; model.price, "", new { @class = "text-danger" })
            &lt;/div&gt;
        &lt;/div&gt;

        &lt;div class="form-group"&gt;
            @Html.LabelFor(model =&gt; model.totalprice, htmlAttributes: new { @class = "control-label col-md-2" })
            &lt;div class="col-md-10"&gt;  
                    @Html.EditorFor(model =&gt; model.totalprice, new { htmlAttributes = new { @class = "form-control", @type = "number" } })
                    @Html.ValidationMessageFor(model =&gt; model.totalprice, "", new { @class = "text-danger" })             
            &lt;/div&gt;
</code></pre>

<p>and here is the controller:</p>

<pre><code>        [HttpPost]
        public ActionResult Add(Model model)
        {
            obj.Quantity = model.quantity;
            obj.Price = model.price;
            obj.TotalPrice = model.totalprice

            db.Details.Add(obj);
            db.SaveChanges();
            return RedirectToAction("");
        }
</code></pre>

<p>now I want to multiply values of 1st and 2nd textboxes and show them in 3rd textbox. For example if users enter 5 in 1st textbox and 100 in 2nd textbox then it automatically shows 500 in 3rd textbox and if users changes value of 1st or 2nd textbox then value of 3rd textbox should also change accordingly.
Thanks.</p>