public static void RaiseAjaxEvent(Control sender, EventHandler AjaxEvent) { if (AjaxEvent != null) { AjaxEventArgs args = new AjaxEventArgs(sender, AjaxEvent); // sender.RaiseBubbleEvent(sender, args); // Control.RaiseBubbleEvent is not accessible since it is protected. For avoiding scattering this code // by all the webwidget classes that have ajax events, we will call it by reflection MethodInfo raiseBubbleEvent = sender.GetType().GetMethod("RaiseBubbleEvent", BindingFlags.NonPublic | BindingFlags.Instance); raiseBubbleEvent.Invoke(sender, new object[] { sender, args }); if (!args.EventRaised) { AjaxEvent(sender, args); } } }
public IteratorCommandAjaxEventArgs(int index, Control commandSource, AjaxEventArgs args) : base(index, commandSource) { AjaxEventArgs = args; }
public DataGridCommandAjaxEventArgs(DataGridItem item, Control commandSource, AjaxEventArgs args) : base(item, commandSource, new CommandEventArgs("", null)) { AjaxEventArgs = args; }