Welcome Guest Search | Active Topics | Sign In | Register

Dialog in update panel momentarily shows old value Options
Sterling
Posted: Wednesday, December 17, 2008 12:33:02 PM
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?
eo_support
Posted: Wednesday, December 17, 2008 3:29:18 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

When you say "each time I show a new dialog", do you mean you show the same dialog with a different ContentUrl?

Thanks!
Sterling
Posted: Wednesday, December 17, 2008 5:10:45 PM
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.
eo_support
Posted: Wednesday, December 17, 2008 5:25:24 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
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
Sterling
Posted: Thursday, December 18, 2008 1:00:07 PM
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.
eo_support
Posted: Thursday, December 18, 2008 2:01:02 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
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!



You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.