I have migrated an application that had no master pages to one using master pages. I removed the references to the user controls from each page and placed them in the master so they could be used in all the pages. In the code behind, I am no longer able to access the properties of each user control. Below is the old code and what I have tried updating it too, but in the new code, get an error trying to access the title property of the user control. Any help would be great!
Old Code:
Me.ucNavBar.Title = "Add New Product"
New Code:
Master.FindControl("ucNavBar").Title = "Add New Product"
Error on new code:
'Title' is not a member of 'System.Web.UI.Control'.
Cast it to your specific type to gain access to the Title Property:
CType(Master.FindControl("ucNavBar"), UserControl).Title = "Add New Product"