We can use for this ClientScript.RegisterStartupScript function and write java-script code and after that it`ll be close automatically.
Below code we can use where we need to open & close popup from code (C#)
Code
Function
Function
- public void RedirectToParent(string url, Type type)
- {
- string js = "";
- js += "window.opener.location.href='" + url + "';";
- js += "window.close();";
- ClientScript.RegisterStartupScript(type, "redirect", js, true);
- }
Calling Function
- Type type = this.GetType();
- RedirectToParent("http://www/xyz.co/...", type);


Deepak VermaPosted May 2, 2018, 3:38 AM EDT
Nice one......................