The name 'Global' does not exist in the current context
I'm getting the above error when trying to reference a property I've created in Global.asax:
public static String ThemeColor
{ get; set; }
from the C# on the aspx page (outputting some javascript):
alert("<%=Global.ThemeColor %>");
Any ideas why?
Several options:
Global
, Maybe you changed it?using
of the namespaceYou really should not use the
Global.asax
to handle the theme color.css
seems to be a more appropriate place for it...