C
clintonG
I'm trying to build a class file in App_Code to reference LinkButton
controls located in a MasterPage.
I know how to reference the controls in the MasterPage from Content pages
but I'm having a problem when moving all the code from the various Content
pages into a class. The erroer
// basic use case (base class inherits System.Web.UI.Page)
public class HeaderTabbedNavigation : GlobalBaseClass
{
static void IsEnabled(bool enabled)
{
if(enabled == true)
MemberLoginStatus.Enabled = true;
return;
}
}
// direct access (fails)
HeaderTabbedNavigation.IsEnabled(true);
// error
'MemberLoginStatus' does not exist in the current context
Is this enough information for somebody to tell me what am I doing wrong and
how should I start thinking when creating classes in this context?
<%= Clinton Gallagher
controls located in a MasterPage.
I know how to reference the controls in the MasterPage from Content pages
but I'm having a problem when moving all the code from the various Content
pages into a class. The erroer
// basic use case (base class inherits System.Web.UI.Page)
public class HeaderTabbedNavigation : GlobalBaseClass
{
static void IsEnabled(bool enabled)
{
if(enabled == true)
MemberLoginStatus.Enabled = true;
return;
}
}
// direct access (fails)
HeaderTabbedNavigation.IsEnabled(true);
// error
'MemberLoginStatus' does not exist in the current context
Is this enough information for somebody to tell me what am I doing wrong and
how should I start thinking when creating classes in this context?
<%= Clinton Gallagher