Close from content server sode

2 posts, 1 answers
  1. Sean
    Sean avatar
    4 posts
    Member since:
    Mar 2012

    Posted 03 Jun 2012 Link to this post


    I am browsing a webpage inside the radwindow and i am trying to close the window from that page by C#.
    After doing my functionlity i am calling:

     ScriptManager.RegisterClientScriptBlock(this, GetType(), Guid.NewGuid().ToString(), "window.close()", true);

    but it is not working for me can any body having the same problem.. I am using Chroome.

  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Jun 2012 Link to this post

    Hi Sean,

    Try the following code to achieve your scenario.

    string code = "if (window.radWindow) oWindow = window.radWindow;else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;oWindow.Close();</" + "script>";
    ScriptManager.RegisterClientScriptBlock(this, GetType(), Guid.NewGuid().ToString(), code, true);

    Hope this helps.

Back to Top