This tutorial will explain you how to close the popup window and refresh parent window in ASP.Net from CodeBehind.
Namespace
using System.Web.UI;
Button Click Event
protected void btnSubmit_Click(object sender, EventArgs e) { ClientScript.RegisterClientScriptBlock(this.GetType(), "ClosePopup", "window.close();window.opener.location.href=window.opener.location.href;", true); }
Imports System.Web.UI
Protected Sub btnSubmit_Click(sender As Object, e As EventArgs) ClientScript.RegisterClientScriptBlock(Me.[GetType](), "ClosePopup", "window.close();window.opener.location.href=window.opener.location.href;", True) End Sub