views:

33

answers:

1

Hello, I have a page with several user controls in different updatepanels. The user controls includes jquery calls which are used to calculate some values and draw graphs(no server methods are called from jquery).

The problem is that, whatever updatepanel is refreshed, all of the jquery calls are processed again. I think the problem arises because i use pageload methods of the usercontrols to do jquery method calls.

I wonder whether there is a way to stop other user controls from calling their pageload methods or refreshing.

thanks in advance.

A: 

maybe this would help...not exactly an answer

when you include custom controls on a page on rendering the controls HTML is included in the page as it is with all JavaScript and css( you can do a View page Source) and check that.

and so in effect there can be 3 pageloads in your page(the page that has the user controls included) in different tags and as such all are getting called when any update panel refreshes.

Pankaj Kumar
thank you,in fact that is the exact problem.And I think the problem is specific to jquery with ajax because in order to use jquery in an ajax enabled user control, jquery calls should be done in pageload method not in $(document).ready method.
daryal