I need to create a radwindow on the server-side when I click on a Button1. The problem is every time I close the radwindow then click on Button1, it creates another copy of the radwindow. So if I open and close the radwindow 4 times, I will have 4 duplicates of the same radwindow. I tried setting DestroyOnClose = true, but it did not change.
Protected Sub Button1_Click()
Dim newWindow As RadWindow = New RadWindow
newWindow.ID = "window_New"
newWindow.KeepInScreenBounds = True
newWindow.Behaviors = WindowBehaviors.Close + WindowBehaviors.Move
newWindow.Skin = "WebBlue"
newWindow.NavigateUrl = "New_Account.aspx"
newWindow.Height = "433"
newWindow.Width = "416"
newWindow.Title = "Create A New Account"
newWindow.VisibleOnPageLoad = True
newWindow.DestroyOnClose = True
RadWindowManager1.Windows.Add(newWindow)
End Sub
Protected Sub Button1_Click()
Dim newWindow As RadWindow = New RadWindow
newWindow.ID = "window_New"
newWindow.KeepInScreenBounds = True
newWindow.Behaviors = WindowBehaviors.Close + WindowBehaviors.Move
newWindow.Skin = "WebBlue"
newWindow.NavigateUrl = "New_Account.aspx"
newWindow.Height = "433"
newWindow.Width = "416"
newWindow.Title = "Create A New Account"
newWindow.VisibleOnPageLoad = True
newWindow.DestroyOnClose = True
RadWindowManager1.Windows.Add(newWindow)
End Sub