Not sure what I'm doing wrong. I have an operation (initiated from a GridButtonItem click) that occurs inside an async postback. Depending on the results of the operation I need to update image and label controls hosted in a RadWindow, display the RadWindow, wait for the user to click a button, determine the button that was clicked and continue with the operation.
For the life of me I can't get the RadWindow to open with generating an exception. I've stripped out the RadGrid and simplified the code to try to find the problem but alas, no joy.
My aspx looks like this:
And my codebehind looks like this:
Clicking the button located outside the UpdatePanel result in the RadWindow displaying without error. Clicking the postback button located inside the UpdatePanel results in the following exception:
Microsoft JScript runtime error: Sys.InvalidOperationException: Can't be called after dispose
Any idea what I'm doing wrong here?
Thanks -- Steve
For the life of me I can't get the RadWindow to open with generating an exception. I've stripped out the RadGrid and simplified the code to try to find the problem but alas, no joy.
My aspx looks like this:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ZZRadWindow.aspx.cs" Inherits="SitefinityWebApp.ZZRadWindow" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <script> function OpenWindow() { var wndMgr = GetRadWindowManager(); wndMgr.open("", "ConfirmPlaybackWindow"); return false; } </script> <form id="form1" runat="server"> <div> <asp:ScriptManager runat="server" ID="ScriptMgr" /> <asp:UpdatePanel ID="WindowUpdatePnl" runat="server"> <ContentTemplate> <asp:Label ID="msgLbl" runat="server" /> <telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="true" runat="server" Skin="Forest" EnableShadow="true" Font-Bold="False" Modal="True"> <Windows> <telerik:RadWindow ID="ConfirmPlaybackWindow" runat="server" DestroyOnClose="False" Skin="Forest" Modal="True"> <ContentTemplate> <div class="confirmationDlgWrp"> <div class="alertWrp"> <asp:Image ID="AlertImg" runat="server" CssClass="dlgIcon" /> <asp:Label ID="AlertLbl" runat="server" CssClass="dlgLabel" Text="Hello World" /> </div> <div class="confirmationDlgBtnWrp"> <asp:Button ID="YesBtn" runat="server" CssClass="dlgYesBtn" Text="Yes" /> <asp:Button ID="NoBtn" runat="server" CssClass="dlgNoBtn" Text="No" /> </div> </div> </ContentTemplate> </telerik:RadWindow> </Windows> </telerik:RadWindowManager> <asp:Button ID="PostBackButton" runat="server" Text="Do Postback" /> </ContentTemplate> </asp:UpdatePanel> <p /> <asp:Button ID="Button1" runat="server" OnClientClick="return OpenWindow()" Text="Open RadWindow" /> </div> </form></body></html>And my codebehind looks like this:
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace SitefinityWebApp{ public partial class ZZRadWindow : System.Web.UI.Page { private static int PostBackCount = 0; protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { msgLbl.Text = string.Format("{0}<p/>PostBackCount: {1}", msgLbl.Text, ++PostBackCount); string script2 = "<script type=\"text/javascript\">OpenWindow();</script>"; ScriptManager.RegisterStartupScript(WindowUpdatePnl, typeof(string), "OpenWindow", script2, false); } } }}Clicking the button located outside the UpdatePanel result in the RadWindow displaying without error. Clicking the postback button located inside the UpdatePanel results in the following exception:
Microsoft JScript runtime error: Sys.InvalidOperationException: Can't be called after dispose
Any idea what I'm doing wrong here?
Thanks -- Steve