D
Demetri
I have created a control library project and a web test project within the same solution. I have followed the walkthrough that MSDN provides on how to create a custom control. All works well.
However, I attempt to create an ASP.Net TextBox control on the custom control and it does not render on the web page when I run the web project.
Here is my code on the custom controls class, Its an override function that adds the controls to the custom control. When I put a break point in there it does indeed stop on it thus I know the event is firing. When the form finishes building these controls do not appear on the page. What am I doing wrong???
protected override void CreateChildControls()
{
this.myTextBox.Text = string.Empty;
this.myGetLinkButton.Text = "Get";
this.myResetLinkButton.Text = "Reset";
Controls.Add(this.myTextBox);
Controls.Add(this.myGetLinkButton);
Controls.Add(this.myResetLinkButton);
}
However, I attempt to create an ASP.Net TextBox control on the custom control and it does not render on the web page when I run the web project.
Here is my code on the custom controls class, Its an override function that adds the controls to the custom control. When I put a break point in there it does indeed stop on it thus I know the event is firing. When the form finishes building these controls do not appear on the page. What am I doing wrong???
protected override void CreateChildControls()
{
this.myTextBox.Text = string.Empty;
this.myGetLinkButton.Text = "Get";
this.myResetLinkButton.Text = "Reset";
Controls.Add(this.myTextBox);
Controls.Add(this.myGetLinkButton);
Controls.Add(this.myResetLinkButton);
}