This control mainly solves the custom composite control, the client verifies the script. Using system; using system.web.ui; using system.web.ui.webcontrols; using system.componentmodel;
Namespace Only.comPositionControls {///
/// Date: 2004-10-10 /// summary> [DefaultProperty ("Value"), ValidationPropertyAttribute ("Value", ToolboxData ("<{0}: LiteralTextBox Runat = Server> {0} : LiteralTextBox> ")] Public class literaltextbox: control, inamingContainer {// The following script is used to enter page number from the text box [DefaultValue (" TEXT: "), Category] public string text {get {this. EnsurechildControls (); Return (LiteralControl) Controls [0]). Text;} set {this.ensurechildControls (); (LitralControl) Controls [0]). Text = value;}} [defaultValue ", Category ("Custom")] public string value {get {this.ensurechildControls (); return ((TextBox) Controls [1]). Text;} set {this.ensurechildControls (); ((TextBox) Controls [1] ) .Text = value;}} [defaultValue (""), category] public unit width {get {this.ensurechildControls (); return ((TextBox) Controls [1]). Width;} set {This.ensurechildControls (); ((TextBox) Controls [1]). Width = value;}} [defaultValue (TextBoxMode.singl eLine), Category ( "Custom")] public TextBoxMode TextMode {get {this.EnsureChildControls (); return ((TextBox) Controls [1]) TextMode;.} set {this.EnsureChildControls (); ((TextBox) Controls [1]). TEXTMODE = VALUE;}} [defaultValue (borderstyle.notset), category] public borderstyle Border, {get {this.ensurechildControls (); return ((TextBox) Controls [1]). Borderstyle;} set {this.ensurechildControls (); (TextBox) Controls [1]). BorderStyle = value;}} [defaultvalue (""), category ("Custom"
)] Public Unit BorderWidth {get {this.EnsureChildControls (); return ((TextBox). Controls [1]) BorderWidth;} set {this.EnsureChildControls (); ((TextBox) Controls [1]) BorderWidth = value.; }}}} Protected override void createchildControls () {this.controls.add (New LitralControl ("text:")); TextBox box = new textbox (); box.text = "value"; box.id = "only"; this .Controls.add (box);}}}