<cc1:ServerControl1 ID="ServerControl1" runat="server">My text </cc1:ServerControl1>
public class ServerControl1 : TextBox{ public override string Text { get { return base.Text; } set { base.Text = value; //Dynamically change the Textbox Control's Width based on the length of the Text this.Width = value.Length * 20; } }}