This is a migrated thread and some comments may be shown as answers.

Close from content server sode

1 Answer 52 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 2
Sean asked on 03 Jun 2012, 01:38 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 04 Jun 2012, 06:05 AM
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.
Tags
Window
Asked by
Sean
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Share this question
or