I have a list of static text that I want the client and server to be able to
share such that I don't have to hard-code the text on both sides. The client
communicates with the server via web services.
How do I set this up so that both sides can simply refer to the the same text?
I tried a struct with static properties, it works on the server but there is
no reference on the client side to the static properties. There's a
reference to the struct but not the properties.
Ex:
public struct StatusType
{
public static string Accepted
{
get { return "Accepted"; }
}
public static string Rejected
{
get { return "Rejected"; }
}
public static string OnHold
{
get { return "On Hold"; }
}
}
It works when I do something similar with enums, but I need to refer to the
actual text such as "On Hold".
TIA
share such that I don't have to hard-code the text on both sides. The client
communicates with the server via web services.
How do I set this up so that both sides can simply refer to the the same text?
I tried a struct with static properties, it works on the server but there is
no reference on the client side to the static properties. There's a
reference to the struct but not the properties.
Ex:
public struct StatusType
{
public static string Accepted
{
get { return "Accepted"; }
}
public static string Rejected
{
get { return "Rejected"; }
}
public static string OnHold
{
get { return "On Hold"; }
}
}
It works when I do something similar with enums, but I need to refer to the
actual text such as "On Hold".
TIA
Comment