Posted on: 11/21/2011 12:46:58 PM | Views : 290

I have a simple label on the Master Page that I would like to access. Let's call it lblName. When I try to access the control, I get get a reference error. But I am able to access my Navigation Menu. 

This works
var menu = (Menu) Master.FindControl("NavigationMenu"); var mi = menu.FindItem("Some Page"); menu.Items.Remove(mi); The menu item is actually removed with no fuss. The following fails on me
var lblName = (Label) Master.FindControl("lblName"); lblName.Text = "Some Value"; The error I receive when I try to set the value is  Object reference not set to an instance of an object.
...

Go to the complete details ...