L
Larry Neylon
Hi all,
I want to be able to expose a [WebMethod] to a page when I add a Server
Control to a page, but I've no idea how (or if) you can do this.
In effect I want to be able to have:
public class MyWebControl : TemplateControl
{
[WebMethod]
public static string DoSomething()
{
.... process ajax call stuff
}
}
Then when I add the control to a page I want have DoSomething() available to
call via AJAX on the page. I've got this all working if I add the WebMethod
directly to the page, I just need to move DoSomething into the Server
Control rather than implement it in each page.
Any ideas?
Many Thanks.
I want to be able to expose a [WebMethod] to a page when I add a Server
Control to a page, but I've no idea how (or if) you can do this.
In effect I want to be able to have:
public class MyWebControl : TemplateControl
{
[WebMethod]
public static string DoSomething()
{
.... process ajax call stuff
}
}
Then when I add the control to a page I want have DoSomething() available to
call via AJAX on the page. I've got this all working if I add the WebMethod
directly to the page, I just need to move DoSomething into the Server
Control rather than implement it in each page.
Any ideas?
Many Thanks.