I\'m looking for ideas and opinions here, not a \"real answer\", I guess...
Back in the old VB6 days, there was this property called \"Tag\" in all controls, that wa
The Tag
property was always a weird wart-like thing that was useful as something off of which you could hang any data you wanted. But it wasn't strongly-typed and it didn't really make for a coherent design. The property itself just hung off the control like a weird knob. They kept it in WinForms to facilitate porting code over from VB6. The new WPF Control
class doesn't have a Tag
.
With .NET you have full object-orientation and adequate type polymorphism, so you can strongly-type whatever extra information you want to associate with a code, whether it's in a subclass or a Dictionary
.
If it's in a single Page
request and you want a general solution a Dictionary in the Page itself for each value type (e.g., Dictionary
and Dictionary
) should be exactly what you need.