You could add an accessor property to your LabelHolder control to do it for you.
public class LabelHolder
{
....
public string Text
{
get
{
return lbCan.Text;
}
set
{
lbCan.Text = value;
}
}
}
so your code becomes
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
LabelHolder lH = new LabelHolder();
lh.Text = "foo";
form1.Controls.Add(lH);
}
}