Posts

Showing posts with the label dynamic created control

Server Control with Child Control, dynamic created, retain control

Image
public class RelatedPublicationFilesSave : Control {     protected HiddenField _test;     protected override void OnInit( EventArgs e)     {         base .OnInit(e);         _test= new HiddenField ();         _test.ID = "_test" ;         this .Controls.Add(_test);     }     protected override void OnLoad( EventArgs e)     {         _RelatedPublicationFilesSave =             this .FindControlById( "_test" ) as HiddenField ;         Log .Debug( "_test.Value: " + _test.Value);     } } the point is that OnInit hap...