Greetings,
I have a MasterPage with a WebDialogWindow and a ScriptManager. The ScriptManager pulls in a JS file with WDW CSOM functions defined to show/hide the WDW. On the MasterPage, I place regular HTML input buttons with onclick events wired to functions that call the WDW show/hide methods in the JS file and everything works as expected.
I have a ContentPage using the above MasterPage with a ScriptManagerProxy. The Content page has its own HTML input buttons with onclick events wired to functions that call the WDW show/hide methods. Clicking these HTML buttons show/hide the WDW on the Master page as expected.
Now, on the Content page I also have two ASP button controls (a "Hide" button and a "Show" button) inside a WARP. Clicking "Hide" hides the hide button and shows the "Show" button and vice versa. Since it is all in a WARP, only partial page updates are occuring as I expect.
Now, how do I envoke the JS methods to show/hide the WDW from the code behind wired up for each of these ASP buttons inside the WARP? I would think something like:
ScriptManager.RegisterClientScriptBlock(.....)
But these envocations don't appear to ever fire. Even something like this:
ScriptManager.RegisterClientScriptBlock(this, Page.GetType(), "script", "alert('hey dummy');", true);
Does not yeild an alert message when I click the button(s).
Any ideas on what to try next?
Thanks,
Ben
HI, The WDW is part of our Aikido controls which leverage the Microsoft® ASP.NET 2.0 AJAX Extensions
So replace our Warp the the Ajax UpdatePanel.
Using the UpdatePanel vs. the WARP seems to have helped my problem, but now I'm facing something new.
I've got a MasterPage (MP) with a ScriptManager (SM) and an UpdatePanel (UP). Inside the UP I've got a WebDialogWindow (WDW). In the MP's code behind, I've exposed a public method to show the WDW. Basically, the method accepts two string args (Caption and Message) and sets the WDW's header caption and content appropriately, and then sets the WindowState to Normal and Modal to true.
In a ContentPage (CP), I've got a WebImageButton (WIB) inside a UP. In the CP's ASPX part, I've included the <@MasterType> directive, pointing the VirtualPath to my MP so I can have a strongly typed MP reference in the CP's code behind. In the CP's code behind for the WIB Click event, I call the MP's public method to show the WDW on the MP.
It works!
BUT, there is a new problem. Once the WDW is shown, I close it using the WDW's built-in close button that appears in the WDW header. Now if I click any WIB on the CP, I get an error:
"A script on the page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?"
I've only ever tested any of this in IE6 (because this is what we're forced to use). Further, it appears that this problem only occurs when I use WIB vs. the ASP Button. Any ideas?
I'm still getting the "script on this page is causing Internet Explorer to run slowly" message, but have ruled out the following:
Essentially, anytime I programmatically (via the code behind) display the WDW it displays and, upon closing it, I will get the error message after some time.
Thoughts?
Note: The WDW is inside an UpdatePanel and NOT a WARP.
Update: If I choose NOT to abort the script, IE appears to lock up for a bit then the error will appear again asking me if I want to abort the script. If I click 'Yes' the second time around, I see another error message:
"Stack overflow at line: 117"
Not sure if this information helps at all.