wrote:
when I did registered it using the "onclick" attribute, it never got to the "RaisePostBackEvent"
I think there must be something wrong you did in your code. Otherwise RaisePostBackEvent handler will automatically called when page is posted back.
I think you might look into
http://www.myviewstate.net/blog/post/2009/05/14/Implementing-IPostBackEventHandler-in-an-ASPNET-Control.aspx[
^] for complete example on this issue.
ASP.NET actually puts some code in onsubmit event of form. Thus based on its id, it raises the callback.
It is very similar to what you are doing. so dont worry how asp.net does. You are actually overriding the normal process of asp.net using
IPostBackEventHandler
.
Cheers.
:cool: