The best solution is to expose values through public properties.
Put the following in your control ABCthat contains the control XYZ:
public string XYZText
{
get
{
return XYZControl.Text;
}
set
{
XYZControl.Text= value;
}
}
Now you can open it on the main page by adding the following property to MasterPage:
public string ExposeXYZText
{
get
{
return ABCControl.XYZText;
}
set
{
ABCControl.XYZText = value;
}
}
, , ( MP - MasterPage):
string text = ((MP)Page.Master).ExposeXYZText;
((MP)Page.Master).ExposeXYZText = "New Value";