Using Property Extender Providers
After I extend a textbox in my own class and inherit like so
Code:
Inherits System.Web.UI.WebControls.TextBox
Then I can register it to my aspx page like so
Code:
<%@ Register TagPrefix="mtb" Namespace="MyTextBoxNamespace" %>
But now HOW do I simulate the same behavior as the TextMode property where I present a dropdown list of options and perform an action based upon what the user selects at design time? I played with an arraylist but I do not like that behavior.
Here is the Class
Code:
Imports Microsoft.VisualBasic
Namespace MyTextBoxNamespace
Public Class MyTextBox
Inherits System.Web.UI.WebControls.TextBox
Private _BindableObject As ArrayList
Public ReadOnly Property BindableObject() As ArrayList
Get
_BindableObject = New ArrayList
_BindableObject.Add("test4")
_BindableObject.Add("test5")
Return _BindableObject
End Get
'Set(ByVal value As ArrayList)
' _BindableObject = value
'End Set
End Property
End Class
End Namespace