0

In ext.net I created a window dynamically and I want when user click a specific button, close that window.

Here is my code.parent window define this:

    Window win= new Window();
    win.ID = "window1";
    win.Title = "";
    win.Height = 400;
    win.Width = 750;
    win.AutoScroll = true;
    win.Resizable = false;
    win.Padding = 5;
    win.Modal = true;
    win.AutoLoad.Url = "child.aspx";
    win.AutoLoad.Mode = LoadMode.IFrame;       
    this.form1.Controls.Add(win);
    win.Render(this.Form);
    win.Show(); 

In child.aspx:

    Parent.window1.close(); // error

Thank you

mshirdel
  • 88
  • 1
  • 13

2 Answers2

1

I think you need...

parent.window1.close(); // note lowercase "p" on "parent"
geoffrey.mcgill
  • 2,375
  • 1
  • 13
  • 21
0

You should use this code : parentAutoLoadControl.close();

in javascript.

mshirdel
  • 88
  • 1
  • 13