Thursday, October 30, 2008

How to call javascript function on userControl load ?

One way to do this is
Register StartUp script on pageload of your usercontrol

Page_Load()
{
ClientScript.RegisterStartupScript(this.GetType(), "onlo", "YourMethod();",true);

}

Another way is
call your method on window.onload