Wednesday, May 04, 2005

Closing Internet Explorer window in ASP.NET




Here is how you can close IE window (e.g. upon some button-clicked event):


  Line  1:  Response.Write("<
script language='javascript'>parentwin = window.self;
parentwin.opener = window.self;
parentwin.close(); </script>"
);





2 comments:

Anonymous said...

It's working great.

Is there a way to avoid internet explorer warning. I have full control of all PCs that are going to use the page if i need to change configuration on client machines. Thanks for your response.

Alex Pinsker said...

What is the warning message?