Skip to content

Commit

Permalink
* Control.cs: Ensure that dynamically loaded controls are
Browse files Browse the repository at this point in the history
	initialized.

svn path=/trunk/mcs/; revision=22618
  • Loading branch information
Jackson Harper committed Jan 30, 2004
1 parent 881f98f commit b6c017b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions mcs/class/System.Web/System.Web.UI/ChangeLog
@@ -1,3 +1,8 @@
2004-01-30 Jackson Harper <jackson@ximian.com>

* Control.cs: Ensure that dynamically loaded controls are
initialized.

2004-01-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* ApplicationFileParser.cs: check for error in directives. Use
Expand Down
6 changes: 4 additions & 2 deletions mcs/class/System.Web/System.Web.UI/Control.cs
Expand Up @@ -57,7 +57,7 @@ public class Control : IComponent, IDisposable, IParserAccessor, IDataBindingsAc
private bool bindingContainer = true;
private bool autoEventWireup = true;

bool inited;
bool inited, initing;
bool viewStateLoaded;
bool loaded;
bool prerendered;
Expand Down Expand Up @@ -377,7 +377,7 @@ protected internal virtual void AddedControl (Control control, int index)
control._userId = nc.GetDefaultName () + "a";
}

if (inited)
if (initing || inited)
control.InitRecursive (nc);

if (viewStateLoaded || loaded) {
Expand Down Expand Up @@ -829,9 +829,11 @@ internal void InitRecursive(Control namingContainer)
}
}

initing = true;
OnInit (EventArgs.Empty);
TrackViewState ();
inited = true;
initing = false;
}

internal object SaveViewStateRecursive ()
Expand Down

0 comments on commit b6c017b

Please sign in to comment.