private void EnableControls(bool enable)
{
foreach (TextBox t in Page.Form.Controls.OfType<TextBox>())
{
t.ReadOnly = !enable;
}
chkSameAsCurrent.Enabled = enable;
}
The above code runs fine in a simple page not having any master page, but if I run it in a ContentPage I can not enumerate the TextBoxes and not even any control in the form.