Wednesday, March 28, 2012

Modal Popup causing double page load

I'm having a problem where it seems that the Modal Popup is causing my pages to double load. I have a simple Master page file which just has my modal popup on it and my pages create the event handlers for the images on the modal popup. When i put a break point on page load i can clearly see that my pages are loading two times.

I'm wondering if anyone else has had this problem and if so is there a simple solution?

Thanks,
Kam

I seem to have answered my own question. I had ImageButtons inside the target panel and those were causing the page to load twice. when i set the visible to false so that they don't render on the page the page doesn't double load.

This might be a bug. Can someone else test it and see if you get the same results?

Thanks,
Kam


I also have a similar problem. I didnt understand all of your answer.

I have a modal popup with an updatepanel with 2 DDL's, 2 image buttons

and 2 text boxes..the DDL's and text boxes have theirautopostback=false

and the DDL's also havecausesvalidation=true.When I click either button,

the code behind fires twice..?? Happy to post the markup if you want..when

do you set thevisible=trueon your buttons? How does that cause a double load?

Thanks..


This can occur if the page is the default page for the application (e.g. default.aspx) and an image or imagebutton is missing the imageurl attribute.

Ok..no help for me..I'm not on the default page, and

my urls are specified..any idea why the code behind

for the 2 imagebuttons fires twice for each click?

Thanks..


Could also be due to a double up with autoeventwireup and manual wiring up of the events:http://forums.asp.net/thread/1287221.aspx

Jason:

I left a detailed response for you at the same link.

Spent the entire weekend trying to get it going by all

combinations of true & false for both the page and the control..Tongue Tied

no luck..Crying

http://forums.asp.net/thread/1287221.aspx

Thanks for your input..Cool

No comments:

Post a Comment