0

While I was typing this I figured out what was causing my issue, but I haven't figured out why it was causing an issue, and it seems strange to me. Maybe someone could explain... Here is my situation (question is at the bottom):

I have 2 modal popups.

PopupControlID as follows:

popup1 
popup2

calling from server side code:

popup1.Show()    'works fine
popup2.Show()    'works fine

at some point though:

popup1.Show() 'inspecting on server side all properties definitely belong to
              'popup1, but when the ajax .js is triggered, popup2 
              'property values are being used 

Everything was set up properly for these controls to run, but something outside of their setup was cauing a problem.

In page_load I was setting the target popup control for popup2 (which was a div) to .Visible = False. When I noticed this code I deleted it because it was unnecessary since I knew the target control was hidden using style="display:none;". After removing this, I ran the code, not expecting this to fix the bug, but the conflict disappeared. I do not understand how this could affect my pop ups in such a manner.

THE QUESTION:

Does anybody know why popup1.Show() would go ahead and use popup2's properties instead of it's own in the ajax script, just because at some point in the code the target control of popup2 was set to .visible = false?

Taylor Brown
  • 1,689
  • 2
  • 17
  • 33
  • Please post your ASPX markup. – Garrison Neely Jun 20 '13 at 20:45
  • the application's markup is over 2000 lines. i am working to replicate the issue on a smaller scale so i can possibly answer my own question, but i will post it when its completed. – Taylor Brown Jun 21 '13 at 19:34
  • i figured out the problem. because of the way the code was written it made it seem more elusive than it really was. i picked up this application from a former employee and its a lot to look at sometimes it makes my head spin. thanks @GarrisonNeely for commenting tho, it pushed me to replicate and realize what i was overlooking. – Taylor Brown Jun 21 '13 at 20:00

1 Answers1

0

In replicating my issue it seems the answer is as simple as this:

Any time you set a control to .Visible = "False" that is also the PopupControlID of a modal popup extender it will cause an error and the page will not load. I feel kinda stupid for now realizing this up front, a real "duh" moment...

Anyway, pretty basic stuff when I realized what was happening. Here is an article related to this issue:

http://blog.matthewdoyle.net/2008/10/13/visiblefalse-vs-displaynone/

Taylor Brown
  • 1,689
  • 2
  • 17
  • 33