


This would just delay the execution of your code and may need tweaking to find the timeout which works. The pageLoad method mentioned earlier is just a shortcut to this event Subscribe to the load event of the Sys.Application javascript object.

Define a pageLoad method JavaScript method which is called on initial load and after ajax updates.The workaround here is to register your code after control initialization. Var menu = $find("") // menu will be null here This means that the following will not work as the client-side object is not initialized: All ASP.NET Ajax controls are initialized when the page is fully loaded - the required initialization statements are output at the end of the page just before closing the form tag. The $find() routine may fail in the occasion when the control is not yet initialized. What it does it to output the generated client-id in the final markup of your page. Using $find("") is the recommended way to get reference to client-side objects.
