Sunday, February 3, 2013

How to override a default child control.

 System.Web.UI.WebControls.WebParts.WebPart {

    public override void CreateChildControls() {
        Label label = new Label();
        label.Text = "Hello World!";
        this.Controls.Add(label);
        base.CreateChildControls();
    }
}

No comments:

Post a Comment