Custom Control Not Updating C# -
i cannot life of me custom control updating itself. in below example, "test label1" works , outputs expected. when try , same thing later on, not. i've tried calling update , invalidate, still nothing. missing something?
swapping points around doesn't work either, doesn't it's off screen example.
public partial class advancedlistcontrol : usercontrol { public void createanotherlabel() { controls.add(new label { location = new point(14, 14), autosize = true, text = "test label2 - test" }); // won't create // me.controls.add(new label { location = new point(14, 14), autosize = true, text = "test label2 - test" }); // update(); // invalidate(); } private advancedlistcontrol me; public advancedlistcontrol() { initializecomponent(); me = this; controls.add(new label { location = new point(26, 26), autosize = true, text = "test label1" }); } }
thanks.
the control method has called control driven end user action, event handler button, causing page postback, cause control trigger method , render page update control state.
Comments
Post a Comment