问它为什么在一次点击中装载,而是在两个点上装载?
<input id="btnPaymentAdd" type="button" value="Add Payment Info" />
</p>
<div id="paymentSection"></div>
<br />
....
$("#btnPaymentAdd").click(function () {
$("#paymentSection").load( /Donation/AddPaymentInfo );
$("#paymentSection").show( slow );
});
....
public ActionResult AddPaymentInfo()
{
var vModel = new PaymentViewModel();
vModel.Payment = new Payments();
vModel.PaymentType = new WCCDentalApp.Models.PaymentType();
ViewBag.PaymentTypes = new SelectList(dbEntities.PaymentTypes.OrderBy(pt => pt.PaymentTypeID),
"PaymentTypeID", "PaymentType1", vModel.Payment.PaymentTypeID);
return PartialView("PaymentPView", vModel);
}