Each webcontrol has only one unique event, not inherited from System.Web.UI.WebControls?

The reason I want to know this is because it seems to __doPostBack('controlId','eventarg') trigger a unique event on the specified control, but I'm wondering what will happen if the control has several unique events.

+3
source share
1 answer

It actually calls the method call RaisePostBackEventthat the control provides through the IPostBackEventHandler interface . The control can then check the argument and raise the corresponding event. Some controls ignore the argument and simply raise the Click value, but in the GridView it can raise events like PageIndexChanging, Sorting, or SelectedIndexChanging.

+2
source

Source: https://habr.com/ru/post/1761158/


All Articles