$(document).ready(function () { $("#ProdID").change(function () { var pID = ($("#ProdID").val()); var url = "/Perchus/GetTaxRt"; $.post(url, { ProductId: pID }, function (data) { $.each(data, function (Row) { $("#PGstRate").append("<option value='" + row.ProducID + "'>" + row.Gst_taxRate + "</option>") }); alert("You May Edit This Tax Rat IF You May It ...") }); }); });
[HttpPost] public JsonResult GetTaxRt(PerchesDetail pd, int ProductId) { var ttx = dc.Product_master.Where(p => p.ProducID == ProductId).FirstOrDefault(); pd.PGstRate = ttx.Gst_taxRate; return Json(pd.PGstRate, JsonRequestBehavior.AllowGet); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)