Author: igorz
Date: 2007-06-28 08:05:09 -0400 (Thu, 28 Jun 2007)
New Revision: 80964
Modified:
trunk/mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs
Log:
support scenario, when Update panel is created programmatically
Modified: trunk/mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs
===================================================================
--- trunk/mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs
2007-06-28 11:59:44 UTC (rev 80963)
+++ trunk/mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs
2007-06-28 12:05:09 UTC (rev 80964)
@@ -103,6 +103,7 @@
bool? _supportsPartialRendering;
bool _enablePartialRendering = true;
bool _init;
+ string _panelToRefreshID;
[DefaultValue (true)]
[Category ("Behavior")]
@@ -370,11 +371,9 @@
string arg = postCollection [postDataKey];
if (!String.IsNullOrEmpty (arg)) {
string [] args = arg.Split ('|');
- Control c = Page.FindControl (args [0]);
- UpdatePanel up = c as UpdatePanel;
- if (up != null && up.ChildrenAsTriggers)
- up.Update ();
+ _panelToRefreshID = args [0];
_asyncPostBackSourceElementID = args [1];
+ return true;
}
return false;
}
@@ -463,7 +462,9 @@
}
protected virtual void RaisePostDataChangedEvent () {
- throw new NotImplementedException ();
+ UpdatePanel up = Page.FindControl (_panelToRefreshID)
as UpdatePanel;
+ if (up != null && up.ChildrenAsTriggers)
+ up.Update ();
}
public static void RegisterArrayDeclaration (Control control,
string arrayName, string arrayValue) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches