开发者

How to initiate JavaScript Callback with MVC2 using RenderAction

I am building a dashboard where I am iterating through a list of controls to render, and I need to initiate a general callback both after each control and after they are all completed. I was curious what the best way to handle this is. I can get the control specific callback fire开发者_如何转开发d off by placing myUserControlCallback(); in the user control itself. I'm just not sure how to run something like allControlsRendered();.

Any ideas?


If you know how many widgets there are you can put a counter inside myUserControlCallback() and count the invocations. When number of invocations reaches number of widgets you know that the current call is last and you can now call allControlsRendered().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜