I’ve created a customize web control with the combination of a Label, TextBox and RequiredFieldValidator. To done this, I create a class Field that inherit a Table Control.
namespace WebHRIS.Controls
{
public class Field : Table
{
private Label lblField;
private TextBox tbField;
private RequiredFieldValidator rfvField;
private string _text;
private string _invalidMessage;
private string _clientScript;
private string _controlID;
public virtual string LabelText
{
get { return _text; }
set { _text = value; }
}
public virtual string InvalidMessage
{
get { return _invalidMessage; }
set { _invalidMessage = value; }
}
public virtual string ClientScript
{
get { return _clientScript; }
set { _clientScript = value; }
}
public virtual string ControlID
{
get { return _controlID; }
set { _controlID = value; }
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
TableRow tr = new TableRow();
TableCell tc = new TableCell();
lblField = new Label();
lblField.Text = _text;
tc.Controls.Add(lblField);
tr.Cells.Add(tc);
tbField = new TextBox();
tbField.ID = _controlID + this.ID;
tc = new TableCell();
tc.Controls.Add(tbField);
tr.Cells.Add(tc);
rfvField = new RequiredFieldValidator();
rfvField.ControlToValidate = tbField.ID;
rfvField.ErrorMessage = this.InvalidMessage;
rfvField.EnableClientScript = (this.ClientScript.ToLower() != "false");
tc = new TableCell();
tc.Controls.Add(rfvField);
tr.Cells.Add(tc);
this.Rows.Add(tr);
}
protected override void Render(HtmlTextWriter writer)
{
base.Render(writer);
lblField.RenderControl(writer);
}
}
}
This is how I used this control
<%@ Register TagPrefix="udc" Namespace="WebHRIS.Controls" Assembly="WebHRIS" %>
<udc:Field ID="fSample" runat="server" LabelText="Sample : " InvalidMessage="ErrorMessage"
ClientScript="false" ControlID="tb" />
Note that this is only a partial code. Now, I’m having a problem like this. 
I want to eliminate the ‘Sample : ‘ text. T.I.A
At a glance, I think you’re getting the second line of text in you Render method:
lblField is the Label control – I would bet that the Label is getting written a second time by the call to
lblField.RenderControl(writer). Try removing that line and see if your control will render properly.