Karthik K

Karthik K

  • 935
  • 738
  • 186.3k

How to close my pop window and Postback to my main Page ?

Nov 21 2017 4:49 AM
Hi , I have using Popup window on the Checkout.aspx page of button click event.
 
Coding which i used to open pop up :
 
protected void btnCustoemr_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "hidePopup", "callParentWindowHideMethod();", true);
ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(760/2);var Mtop = (screen.height/2)-(100/2);window.open( 'ConfirmCart.aspx', null, 'height=700,width=760,status=yes,toolbar=no,scrollbars=yes,menubar=no,location=no,top=\'+Mtop+\', left=\'+Mleft+\'' );", true);
Session["CustomerName"] = txtCustomerName.Text;
Session["MobileNo"] = txtMobileNo.Text;
Session["EmailId"] = txtEmailId.Text;
}
 
it opens with the name of ConfirmCart.aspx.
 
and did all Process after that, I want to go to Index page of my website. How to do it suggest me if possible with the example code .
 
One more thing ., i want to clear Datatable session of object ., when it goes to index.aspx page. How can clear it .,when post back to Index page.
 
Any suggestion !! welcome.Thanks in advance.