0

I create popoup window:

window.open(msg,'LoginPopup');

After popup window implemnet a Get request to this function in the server:

public void GmailOAuthCallback(string code)
{
    object contacts = GmailServiceWorkflow.GetContacts(code);
} 

I want to close the window.

Any idea how can I close the popup window whithin GmailOAuthCallback function?

Michael
  • 13,950
  • 57
  • 145
  • 288

1 Answers1

2

You will need to close the window through JavaScript. C# has no control over the browser. But, as a security feature, it's difficult to close a window from code. Read more here: window.close and self.close do not close the window in Chrome

Community
  • 1
  • 1
Justin Skiles
  • 9,373
  • 6
  • 50
  • 61