So I have these 3 divs on my view called Prepayment.aspx:
<div id="keyRateTable"></div>
<div id="shockTable"></div>
<div id="valueTable"></div>
They get populated with HTML upon a button click, and then AJAX runs through JQuery to populate their HTML.
How do I, from ANOTHER MVC View, access the innerHTML contents of that div, and display them on this view as well? The reason why I can’t just do the same process I did on Prepayment.aspx is because that process could take a very long time and if the user already calculated it, we want to just grab the HTML already produced.
In this other view (assuming it is partial and on the same page) you could use javascript and jquery:
If the HTML is not on the same page you cannot obtain it from another view. It simply doesn’t exist anywhere. You will need to refetch it from the server. This being said if you want to avoid hitting the database or perform some lengthy tasks you could always cache the results or store them into the session.