Add this ...
public string Whatever
{
get { return label.Text; }
set { label.Text = value; }
}
to the ascx control. Then from the page you insert, you can simply set the text as ...usercontrol.Whatever = "text to display";
or you can use any property as a property on the aspx side of the page.
source
share