<p>I wonder if anyone can think of a good technique to enable any arbitrary section of an aspx page (say, the contents within a specified DIV tag) to be able to be called and displayed in an ajax modal popup? (So, only a certain section of the page would be displayed)</p>

<p>For example:<br>
1) You have a large application with many entities (Customers, Products, Stores, etc, etc etc)<br>
2) Each entity has an EntityDetails aspx page</p>

<p>Now, say from an Invoice screen that shows many entities of different types, I would like to be able to mouseover (or click a small icon) an entity, and have a little tooltip style modal ajax window popup, and what is shown will be the PORTION of the corresponding EntityDetails aspx page that was designated as available for rendering as a popup.
Obviously, the corresponding aspx arguments identifying the specific entity would have to be passed from the page as well.</p>

<p>So to do this, ** I think the requested page would have to be rendered in memory on the server **, and then the innerhtml would have to be pulled out of the designated div, and returned to the calling page, which would then display this html in a popup ajax window.
So, unless there is an easier way to do this that I am missing, how would this rendering be done on the server?</p>

<p>Has anyone seen this done before, is there any sort of a pre-existing framework or anything to do this?</p>

<p>And to complicate things further, would it be possible to have the popup form be editable and saved back to the server utilizing the existing asp.net form mechanism already embedded within the existing page (if the calling form already had an asp.net form....I think only one form is allowed per page, correct?)</p>

<p>And of course, opening the EntityDetails form via a simple javascript popup or new window is not what I am looking for.  And I do not want to have to embed the details form on each page where I may want it to display...every form in the application could conceivably call any other as a popup.</p>

<p>Thanks!</p>

[{'answer_id': 77858, 'author': 'Mitchel Sellers', 'author_id': 13279, 'author_profile': 'https://Stackoverflow.com/users/13279', 'pm_score': 1, 'selected': False, 'text': '<p>You could most likely do this with a collection of user controls and the ModalPopupExtender that is available in the AJAX Control Toolkit.</p>\n'}, {'answer_id': 77865, 'author': 'Danimal', 'author_id': 2757, 'author_profile': 'https://Stackoverflow.com/users/2757', 'pm_score': 1, 'selected': False, 'text': '<p>If you\'re using user controls for the edits, I think you could do it with <a href="http://www.orangoo.com/labs/GreyBox/" rel="nofollow noreferrer">Greybox</a>. Pass the user control name (and other parameters) to the page you show in greybox, then dynamically load the user control that does the edit. </p>\n'}, {'answer_id': 78152, 'author': 'Luke', 'author_id': 14275, 'author_profile': 'https://Stackoverflow.com/users/14275', 'pm_score': 0, 'selected': False, 'text': "<p>I can't vote but user controls would be the way to.</p>\n"}, {'answer_id': 2434747, 'author': 'tbone', 'author_id': 8678, 'author_profile': 'https://Stackoverflow.com/users/8678', 'pm_score': 1, 'selected': True, 'text': '<p><a href="http://api.jquery.com/load/" rel="nofollow noreferrer">http://api.jquery.com/load/</a>\n<a href="http://css.dzone.com/articles/jquery-load-data-from-other-pa" rel="nofollow noreferrer">http://css.dzone.com/articles/jquery-load-data-from-other-pa</a></p>\n'}]
['https://Stackoverflow.com/questions/77833', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8678/']