Intersoft Support Center

Create Window in Client-side

WebDesktopManager allows user to create new window at runtime.

This topic will show you how to add new window from client-side.

To add new window at client-side

  1. Drag WebDesktopManager from Toolbox into a WebForm page. 
  2. On the upper-right corner, click the arrow next to Add Window TaskBar. It is known as WebDesktopManager Tasks.
  3. Click Edit Templates.

  4. Click the DropDownArrow and choose TaskBarLeft.
  5. Drag a HTML Image control from the ToolBox to the TaskBarLeft. You may customize the image from its properties according to your needs. 

  6. In the client-side, add the following code:

    JavaScript Copy Code
    function AddWindow()
        var dm = ISGetDesktopManager();
        var wnd = dm.GetWindow("wndAboutDM");
        if (wnd == null)
            wnd = new WebDesktopWindow();
            wnd.Text = "About DesktopManager";
            wnd.Name = "wndAboutDM";
            wnd.ControlBoxImage = "is_webdesktop-16.gif";
            wnd.ContentURL = "../About.aspx";
            wnd.ContentMode = "UseIFrame";
            wnd.AllowMinimize = "No";
            wnd.AllowMaximize = "No";
            wnd.ResizeTo(600, 400);

  7. Invoke AddWindow() function from the image's onclick event.

    Script Copy Code
       <img src="../Images/WebDesktopIconRound.png" onclick="AddWindow()" style="CURSOR: pointer" title="New Window">

  8. Run the project and click the image on the bottom-left corner, which is indicated as New Window. It will display a new window like the following.

Previous Next