0

hi,
iam using the following javascript a page
opener.location.reload( true );
but every time the page reloads iam a getting alert message.
How can i reload a page with out a alert message

1
Contributor
1
Reply
2
Views
9 Years
Discussion Span
Last Post by greeny_1984
1

In parent page:

protected void Page_Load(object sender, EventArgs e)
    {
        this.ClientScript.GetPostBackEventReference(this, string.Empty);

        if (this.IsPostBack)
        {
            string eventTarget = (this.Request["__EVENTTARGET"] == null) ? string.Empty : this.Request["__EVENTTARGET"];

            if (eventTarget == "ChildWindowPostBack")
            {
              //update work goes here
            } 
}

In child page:

ClientScript.RegisterStartupScript(this.GetType(), "msg", "window.close();window.opener.__doPostBack('ChildWindowPostBack', '');", true);

Edited by Dani: Formatting fixed

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.