|
Rank: Member Groups: Member
Joined: 9/24/2008 Posts: 11
|
This problem has been driving me crazy. I am using the dialog control to do a bunch of modal MsgBoxes. The main page never reloads but only uses AJAX 1.0 update panel refreshes. The dialog is in its own update panel. If all works fine except that each time I show a new dialog, the previous version of the panel displays for about .5 seconds before the new dialog displays. It is like the update panel puts out the last html before your control renders the new dialog. I am using IE7. Any suggestions on how to fix this?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
When you say "each time I show a new dialog", do you mean you show the same dialog with a different ContentUrl?
Thanks!
|
|
Rank: Member Groups: Member
Joined: 9/24/2008 Posts: 11
|
Yes, with new Header, Content and Footer urls. Sometimes it is a login box, sometimes it is a tool choice, sometimes it is a msgbox. I have about 10 different ones.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The root cause for this is IE tries to be too smart. It does not start loading a page until it is sure the page is visible. So when the dialog had PageA in it, even after you set its ContentUrl to PageB, it won't start loading PageB until the dialog is visible, at which point you will briefly see PageA until PageB is being loaded.
Depending on your situation, you can devise one or more workarounds. The key for all workarounds is that you need to clear out the contents when the dialog closes, which usually would require you to work with ContentTemplate directly instead of ContentUrl. For example, you can put a div inside the dialog's ContentTemplate, then set that div's innerHTML to include an iframe to load your content page, and also handle the dialog's ClientSideOnEnd event to reset the div's innerHTML to blank.
Hope this helps.
Thanks
|
|
Rank: Member Groups: Member
Joined: 9/24/2008 Posts: 11
|
So I generate the html into the content template? How do I get to use all the style settings for the header, etc? Do I have to create all that myself?
I do not get what you are doing with the iframe. I should have said above that I was setting the Header, Content and Footer HTML (not urls), so maybe that's it.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
If you were using ContentUrl, then you would need iframe because you are working with Url. If you are not using separate Urls, then you do not need iframe. In that case you should not have any problem as soon as you update the dialog before displaying it. If you continue to have problem, please create a test page reproducing the problem and we will be happy to take a look.
Thanks!
|
|