If you've ever tried to close a browser window from ASP.NET by using the following code:

 

<input type="button" class="inputfields"
 onclick="javascript:window.close();" value="Close" /></td>

You will probably receive the following message:

 

After digging around for 20 minutes or so, I finally found the answer on Anatoly Lubarsky's blog:

 

<input type="button" class="inputfields"
onclick="javascript:window.opener='x';window.close();" value="Close" /></td>