c# - Reload page with new parameters -
i have popup window , when click button close window , reload parent window new parameters. example url page.apsx?id=oldparameter
, parent reloaded new parameter page.aspx?id=newparameter
i have like:
object newparameter = r[“id”]; string url = “~/page.aspx?id=” +newparameter ;
then tried this:
response.write("<script language='javascript'> {window.opener.document.forms[0].elements['id'].value = '" + url + "'; top.close();}</script>");
but doesn’t work. can show me how this? thank much.
i think instead of response.write
need scriptmanager.registerstartupscript
string script = "window.opener.document.forms[0].elements['id'].value = '" + url + "'; top.close();"; scriptmanager.registerstartupscript(this, this.gettype(), "key", script , true);
i think work
Comments
Post a Comment