A
A.M
Hi,
Can Global object have non-static methods?
If answer is yes, then How can I access them in pages?
I have following property in Global.asax.cs, but when I try to use it in
pages, I receive error "An object reference is required for the nonstatic
field, method, or property CurrentDisplayName":
Thanks,
Alan
public string CurrentDisplayName
{
get
{
string s;
try
{
s = Session[LLCConstants.SESSION_INDEX_DISPLAYNAME].ToString();
}
catch (Exception e)
{
s = "?";
}
return s;
}
set
{
Session[LLCConstants.SESSION_INDEX_DISPLAYNAME] = value;
}
}
Can Global object have non-static methods?
If answer is yes, then How can I access them in pages?
I have following property in Global.asax.cs, but when I try to use it in
pages, I receive error "An object reference is required for the nonstatic
field, method, or property CurrentDisplayName":
Thanks,
Alan
public string CurrentDisplayName
{
get
{
string s;
try
{
s = Session[LLCConstants.SESSION_INDEX_DISPLAYNAME].ToString();
}
catch (Exception e)
{
s = "?";
}
return s;
}
set
{
Session[LLCConstants.SESSION_INDEX_DISPLAYNAME] = value;
}
}