3

Possible Duplicate:
Call ASP.NET Function From Javascript?

In my custom ajax server-side control I draw image (using html5) and I need to invoke server-side function when user click it (just do it usual button).I want to do it like this:

    <xx:MyControl ... runat="server" onchange = "server side function"/>

I dont want just invoke do_postback function with ControlId an EventArgument parametrs beckause then I must do additional work to specify the action and invoke appopriate function - I want to keep my code-behind clear and I dont want end user that will use my component do this work.

Community
  • 1
  • 1
Anton Putov
  • 1,951
  • 8
  • 34
  • 62

1 Answers1

3

You will need to implement IPostBackDataHandler interface, this and this article will guide you to accomplish this.

Adil
  • 146,340
  • 25
  • 209
  • 204