ScriptManager.RegisterStartupScript(this.Parent.Page, this.GetType(), "ScrollDown2Result",
"$(document).ready(function() {$" +
"('html,body').animate({ scrollTop: 800}, 'slow');" +
"});", true);
Friday, March 26, 2010
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);
ScriptManager.RegisterStartupScript(this.Parent.Page, this.GetType(), "foo", "document.getElementById('" + this.ad_display.ClientID + "').innerHTML = ('" + DateTime.Now.ToString("yyyyMMddhhmmss") + "');", true);
Subscribe to:
Posts (Atom)