<asp:UpdatePanel runat="server" ID="UpdatePanel1">
<ContentTemplate>
<ig:WebDialogWindow ID="WebDialogWindow1"
runat="server" Width="200px" Height="100px" Modal="true" Visible="true"
WindowState="Hidden" InitialLocation="Centered">
<Header CaptionText="Caption">
</Header>
<ContentPane>
<Template>
<asp:Label ID="Label1" Text="Please wait …." runat="server" />
</Template>
</ContentPane>
</ig:WebDialogWindow>
<asp:CheckBox ID="CheckBox1" runat="server" />
<asp:Button ID="Button1" runat="server" Text="Save" OnClick="Button1_Click" />
</ContentTemplate>
</asp:UpdatePanel>
<script type="text/javascript">
//Add handlers to Begin and End requests raised by UpdatePanel
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_beginRequest(showWebdialogWindow);
prm.add_endRequest(hideWebDialogWindow);
function showWebdialogWindow() {
var wdw =
$find(‘<%=WebDialogWindow1.ClientID %>’);
wdw.set_windowState($IG.DialogWindowState.Normal);
}
function hideWebDialogWindow() {
var wdw =
$find(‘<%=WebDialogWindow1.ClientID %>’);
wdw.set_windowState($IG.DialogWindowState.Hidden);
}
</script>
Hi Rado,
I am facing a browser compatibity issue with my website. It is working fine on IE 6,7 and 8 on development machine. But on client machine which is having IE 8 the WebDialogWindow throws javascript error and it never loads.
Only on turning on the “Compatibility view” it started working on client’s machine as well.
Can you please suggest any solution to fix this without asking the users to switch to compatibility view?
Thanks in advance.
Hi Aksimet,
Thanks for your question. I would suggest a few approaches to get rid of this issue.
First of all if you experience any errors with the control the recommended way would be to contract the support team. As far as I know IE8 is fully supported environment for WebDialogWindow and if your version is old one the best resolution would be upgrade to latest service release for the version or upgrade to newer one.
If you prefer some kind of work around something that come up on top of my head is to use metatag to instruct the browser to emulate the IE7, more info, please have a look at this link :http://ilia.ws/archives/196-IE8-X-UA-Compatible-Rant.html
For the second approach aren’t needed user effort.
Hope this helps!
Hello,
Meta tags didn’t work for me, I am dealing with “NetAdvantage ASPNET 20083 CLR35” version “8.3.20083.1009”. I am going to contact the support team regarding this.
Thank you very much for your help.
Hi Aksimet,
I think this is the best way to go as contact the support guys.
Good luck!
Rado
Hi Rado, Thanks for nice post.
How to set WebDialogWindow.WindowState to Normal from code behind only without any user event? For example, I executed one stored procedure and if result was -1, then I need to run another long lasting process such as Oracle package and in this case I need to set WebDialogWindow.WindowState to Normal. In all other cases I do not want to show WebDialogWindow.
Hello Dmmitry,
You can change the state of the control in this way:
The code above will work only on postback but as you said if you need to wait a long lasting procedure and use an UpdatePanel in the equation make sure that the WDW is defined inside the updatePanel control. Implemented in this way it’s a kind of blocking operation , you may choose to go differently with async methods on the server and some javascript code that returns to the client as soon as the server operation completes and you set via javascript the state of the control.
Hope this helps a bit
Best, Rado
Thanks Rado very much.
First of all your code is great and I used it already as is to patch our imediate needs. Regarding Page_load and everything else: I sure tried it in this way and it sure did not work straight forward in production, probably because of complexity our asp page. But you just confirmed that it should work and it gives me good point to spend part of my weekend to make it working in any 🙂
Thanks again and happy coding.
Dmitriy