Tuesday, September 2, 2008

Parent page refresh after processing in the POP UP and closing the same

Hi All,
I spent 2-3 hours to search for this ....

POP UP should perform database interaction and close after the interaction and refreshing the parent page...

On Page1.aspx

butUser.Attributes.Add("onclick","window.open('AddUser.aspx',null,'Height=300,width=450,status=no,resizable=no,scrollbar=no,toolbar=no,location=no,menubar=no');");


It opens the AddUser.aspx page in a pop up..
On the AddUser.aspx page:

protected void butUser_Click(object sender, EventArgs e)
{
CreateUser();
this.butUser.Attributes.Add("onClientClick", "closePopup();");
Page.ClientScript.RegisterStartupScript(this.GetType(), "mes", "closePopup();", true);

}







Thanks,
Nitin Sharma