I'm working on a large-scale asp.net (vb) project, and I'm wondering if there's a way to add a new method to the Control class.
Inheritance isn't really an option -- if I made ControlEx Inherits Control and added it there, I'd then need to create a WebControlEx, LabelEx, DropDownList, etc to inherit from that.
I tried creating a Partial Public Class Control and adding the method there (well, okay, I added a simple property for testing purposes), but it didn't work -- I'm pretty sure that's just creating a new "Control" class and not even trying to append to the pre-defined one.
Partial Public Class Control
Private _test As Integer
Public Property Test() As Integer
Set(ByVal value As Integer)
_test = value