Saturday, March 20, 2010

javascript execution after asynchronous postbacks

If you are in a user control you have to reference the parent in RegisterStartupScript.

ScriptManager.RegisterStartupScript(this.Parent.Page, this.GetType(), "foo", "document.getElementById('" + this.ad_display.ClientID + "').innerHTML = ('" + DateTime.Now.ToString("yyyyMMddhhmmss") + "');", true);

No comments: