+2008-06-10 Noam Lampert <noaml@mainsoft.com>
+
+ * TemplateControl.jvm.cs: Don't assume that controls containing page-specific
+ callbacks (e.g. Page_LoadComplete) are necessarily Page derivatives.
+
2008-06-04 Juraj Skrispky <js@hotfeet.ch>
* PageParser.cs (ProcessMainAttributes): Take value of
using System.Xml;
using vmw.common;
using System.Web.Util;
+using System.Collections.Generic;
namespace System.Web.UI {
typeof (object),
typeof (EventArgs) };
+ LifeCycleEvent[] _pageEvents = new LifeCycleEvent[] {
+ LifeCycleEvent.PreInit,
+ LifeCycleEvent.PreLoad,
+ LifeCycleEvent.LoadComplete,
+ LifeCycleEvent.PreRenderComplete,
+ LifeCycleEvent.SaveStateComplete,
+ LifeCycleEvent.InitComplete
+ };
+ List<LifeCycleEvent> pageEvents = new List<LifeCycleEvent>(_pageEvents);
+
+ bool isPage = Page.GetType().IsAssignableFrom(GetType());
+
for (int i = 0; i < methodNames.Length; i++) {
+
+ // Don't look for page-only events in non-page controls.
+ if (!isPage && pageEvents.Contains((LifeCycleEvent)i))
+ continue;
+
string methodName = methodNames [i];
MethodInfo method;
bool noParams = false;