Hello,
I have the following code which declares a radwindow in BasePage class, its works fine in aspx pages, but I can't use it in User Controls and Master Pages:
string BaseRadWindowID { get { return "UniqueBaseRadWindowID"; } } RadWindow window = new RadWindow();// Create a enw Window RadWindow BaseRadWindow { get { return window; } } protected override void OnInit(EventArgs e) { this.window = new RadWindow();// Create a enw Window window.ID = BaseRadWindowID;// the id of the RadWindow; this.Form.Controls.Add(window);// Add it to the page base.OnInit(e); } public void ShowBaseRadWindow(bool visibleOnPageLoad, string navigationUrlQueryString) { BaseRadWindow.Width = Unit.Pixel(450); BaseRadWindow.Height = Unit.Pixel(150); BaseRadWindow.VisibleOnPageLoad = true; BaseRadWindow.VisibleStatusbar = true; BaseRadWindow.ReloadOnShow = true; BaseRadWindow.Modal = true; BaseRadWindow.Behaviors = WindowBehaviors.Close; BaseRadWindow.Style.Add("z-index", "10000"); BaseRadWindow.NavigateUrl = "~/Pages/Messages/Default.aspx" + navigationUrlQueryString; BaseRadWindow.VisibleOnPageLoad = visibleOnPageLoad; }I call the window in the aspx pages in this way:
this.ShowBaseRadWindow(true, string.Empty);Please, I need your help in order to call the window and show it in User Controls and Master Pages.
It is very appreciated to send me the modified code.
Regards,
Bader