How to access Master page controls from the Content page
At first, use the Page.Master property to get a reference to the actual master page instance, the use the Master.FindControls method to find and reference the controls declared in the Master page.
For example,
MasterPage master = Page.Master;
UserControl headerControl = (UserControl)(master.FindControl("PageHeader1"));
HtmlImage imgHead = (HtmlImage)(headerControl.FindControl("img0Category"));
if(imgHead != null)
{
imgHead.Src = "/images/categoryb.gif";
}