Updating Parent Page

W

Wannabe

I have the following line of code in a couple pages:

ClientScript.RegisterStartupScript(typeof(Page), "ReloadParent",
"window.opener.location.href = 'summary.aspx?projectID=" +
Request.QueryString.Get("projectID") + "';", true);

On one page, this works just like I want it to. It updates the parent page
each time a value on it is changed. This exact same line does not work on a
different page. The only difference I can see is that the page where it does
not work has all controls in an update panel. Can that be the problem? If
that is the problem, is there anyway to get the page with the updatepanel to
update the parent page like the page that does it, and does not have an
update panel?
 
B

bruce barker

on an async postback (update panel), the panels html is passed back and
the panel div's innerHTML is set to the html. inline javascript is not
processed with this method. you need to the
ScripManager.RegisterStartupScript, which will pass the script back to
the client as a seperate parameter.

-- bruce (sqlwork.com)
 
W

Wannabe

Works great...thank you.

bruce barker said:
on an async postback (update panel), the panels html is passed back and
the panel div's innerHTML is set to the html. inline javascript is not
processed with this method. you need to the
ScripManager.RegisterStartupScript, which will pass the script back to
the client as a seperate parameter.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top