Due to the customization of the process, the information of each process may need to be rendered repeatedly.
When I use WebUserControl, I will always appear directly to add controls in the middle of the CS.
code show as below:
WebUserControl:
Wuc.ascx
Private int _i = 0; public int i {get {return this._i;} set {this._i = value;}}
Private void Page_load (Object Sender, System.EventArgs E) {IF (! page.ispostback) {textbox box = new textbox (); box.text = this._i.to.Tostring (); this.controls.add (box); }
ASPX:
Private void page_load (object sender, system.eventargs e) {wuc uc = new wuc (); uc.i = 100; panel1.controls.add (uc);
}