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

    Hi 

    I am browsing a asp.net webpage inside the radwindow and i am trying to close the window from that asp.net 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.

    Imran
  2. Answer
    Princy
    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.

    C#:
    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.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top