Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
Load Maximized Page on Demand?
posted

I have a TileManager where the maximized state of each tile is an Html.Partial() page. Some of these pages have a lot of code in them. I have noticed that all of the code of all of the pages renders in full when the TileManager page initializes. To make matters worse, it all renders twice: once in linear order, and then again as TileManager rearranges everything. As a result, jQuery delegate events in any partial page get intialized twice.

What I really want is a way to render only the content in the minimized tiles (<div id="minimized">a little code</div>), and render the contents of the maximized pages (<div id="maximized">@this.HtmlPartial("SomePage")</div>) on demand. Ideally, once loaded the page would remain loaded so the next time it is clicked the page will load immediately. At the very least, javascript events should not init twice.

Thanks, Carl