I have this situation:
A page with an accordion with 2 tabs, one has a list of payment methods, and the second has a summary of order with ordinal lines, amounts and totals (displayed as a partial view). The choice of payment method leads to a recount of the results of orders, adding additional costs, etc.
What is the recommended way to display a new set of orders after choosing a payment method using AJAX?
Making an AJAX call and getting all new amounts, sequence numbers, etc. and setting these values using JS seems inefficient to me. The ideal situation would be if I could make an AJAX call with the selected payment method, and this call will return HTML, which I can use to replace the old summary report.
Is it wrong to display a partial HTML view on the server and return it using JSON? What is best for this situation?
source share