Hi Everyone.
Hope you're having a good Friday and stuff... okay, so here's my question:
All my ASPX pages inherit from a base class called BasePage. BasePage inherits from:
System.Web.UI.Page
Now, how do I access/set a control in my aspx page from my page base? I've tried this:
HyperLink hypMainMenu = (HyperLink)Page.FindControl("hypMainMenu");
hypMainMenu.NavigateUrl = AppConfiguration.AppSettings.Urls.MainMenu;
But hypMainMenu is always null - I can't find the bastard. Any ideas? Or is this bad practice and someone can reccommend a better way to do this?
Thanks in advance!