I\'ve a user control which contains asp:Literal.
As mentioned in the answer by JerSchneid, if obj is null, you'll get that error. So, try doing it like this -
internal void Setup(MyBusinessObject obj)
{
if(obj == null)
MenuContainer.Visible = false;
else
MenuObject menu = MenuHelper.GetMenu(obj.State);
}
EDIT: I know you are getting an error on that line, but just try doing it like this. Or, else, remove the whole code and just keep the MenuContainer.Visible = false; line.