views:

685

answers:

2

Hi,

I am unable to implement PageMethods feature of the scriptmanager in a usercontrol, is a way in which this can be done?

+3  A: 

No this can't be done. See "PageMethods in UserControl" and "ASP.NET AJAX Page Methods from UserControl".

JoshBerke
+1  A: 

I was pretty simple, we just need to write the pagemethods in the codebehind of the aspx page in which the ascx will be embedded and voila! we can now use the PageMethods feature of the scriptmanager in a usercontrol.

renegadeMind
Of course this kind of breaks the whole idea of UserControls being cleanly encapsulated little blocks of code, but yes, it works.
eidylon