Dec 2, 2009

jQuery $(document).ready and UpdatePanels

It happened that I was using jquery in a user control inside update panel and the events that were bound using the .ready function worked initially but it stopped working after a callback made by update panel. The following code helped solve the problem. If you add all loading statements in a JS function say 'LoadMyControls' then in your user control, in script add following line:

Sys.Application.add_load(LoadMyControls);


This will call jquery's .Ready event everytime on callback and controls will work normally

No comments:

Post a Comment