Ok, I think i found out what the problem is.
It seems that using the load on demand method actually causes the entire page to load on the server for each request. Needless to say, this makes the popup a bit expensive, especially if the page has complex data queries.
I am now trying to implement the WebService method, and I am running into another problem. I am getting an error:
Error executing child request for handler 'System.Web.UI.Page'
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) at ViewManager.RenderView(String path, Object data) in c:\inetpub\wwwroot\App_Code\BigThumbnailWebSVC.vb:line 66
It's happening on this line:
If I step through the code in the debugger, I see that all the methods, and databinding of the .ascx control get executed without any error.
Has anyone seen this problem before? if so, is there a work around?
Thanks in advance.