To find the master page control on the other pages we can use this:
Button btnphotograph = (Button)this.Master.FindControl("btnphotograph");
btnphotograph.Text="Hello!!";
This should find any Control on page
private Control FindALL(ControlCollection page, string id)
{
foreach (Control c in page)
{
if (c.ID == id)
{
return c;
}
if (c.HasControls())
{
var res = FindALL(c.Controls, id);
if (res != null)
{
return res;
}
}
}
return null;
}
Call like:
Button btn = (Button)FindALL(this.Page.Controls, "a");
btn.Text = "whatever";
See if the ID of the control is in fact being rendered as 'a'. Use firebug or developer tools while page is loading. You can change client id mode to static and get the same ID each time.