[CLOSED] Howto show a windows from a class

  1. #1

    [CLOSED] Howto show a windows from a class

    Hello

    I am struggling with the simple task to show a window from a class file. If I show it from main aspx.cs from a direct method I normally do it like this:
    Window win = new Window();
    win.Render(this.Form);
    but from a class file "this.Form" is not working. What is the best way to do it from a class file? Using "getcmp" or ...?

    Thank you very much for any tip in the right direction.

    best regards
    Last edited by Daniil; Oct 15, 2015 at 6:37 PM. Reason: [CLOSED]
  2. #2
    Hi @tMp,

    With a Window you can just do:
    win.Render();

    On client a Window will be automatically rendered to <form runat="server"> if available or to <body>.
  3. #3
    Hello Daniil,

    Thank you very much, works as suggested. So I never have to use "this.Form" in this case? It seems I got the impression to use it from an way to old example or a bad forum entry.

    best regards!
  4. #4
    Well, yes, if the page instance and, respectively, its this.Form is inaccessible, then yes, it should not be used.
  5. #5
    Thank you for the lesson! :)

Similar Threads

  1. Replies: 3
    Last Post: Feb 20, 2014, 4:24 AM
  2. Replies: 7
    Last Post: Feb 01, 2011, 6:41 AM
  3. [CLOSED] BUG desktop modal windows doen't show context menu in FF
    By juanpablo.belli@huddle.com.ar in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: May 28, 2010, 7:22 AM
  4. Windows 2007 - window.show not working
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: Apr 16, 2010, 3:42 PM
  5. Replies: 2
    Last Post: Apr 02, 2009, 8:13 AM

Posting Permissions