0

I'm building a custom asp.net server control and I want to fire an OnSave method and pass on a parameter to the page implementing the control (best analogy would be the RenderContents method).

The idea is to generate an XML string containing the saved fields and pass it to the developer implementing the control through this OnSave method (in the case of RenderContents method it would be HtmlTextWriter output) so they can access the string in the OnSave method and process it (say save it to the database).

So my question is two-fold:

  1. how do I force the page which implements my control to override my OnSave method?

  2. how can I pass my XML string to some variable in that method so developer can access it via page's codebehind?

Oded
  • 463,167
  • 92
  • 837
  • 979
pnduke
  • 183
  • 3
  • 14

0 Answers0