Posted on 2011-05-10
I'm trying to mimic System.Drawing.Color in that I want to have a class that can return different acceptable values. I have a custom web control and one of the properties that the user can set is PageType. I keep forgetting the values that the control has stored so I want to be able to do something like
MyControl.PageType = CustomPageTypes.HomePage
Right now I do MyControl.PageType = "HomePage" to pass a string as the value but I want to be able to mimic System.Drawing.Color (e.g. for red you can assign System.Drawing.Color.Red)
Working in VB.NET but C# is also acceptable.