First you need to provide a property that returns the Label
of the UserControl
or better just it's Text
. Then you can use the FormView
's FooterRow
property and FindControl
to get it:
var uc = (UserControlTypeName)FormView1.FooterRow.FindControl("Footer");
uc.Value = "New Value";
Here's the property in your UserControl
:
public string Value
{
get { return lbl.Text; }
set { lbl.Text = value; }
}