I have this in a separate class file:
I then use this in my page code:
What am I missing or doing wrong? I get the intellisense error overload, add cannot be called with these arguments. cboAddItem can not be converted to string/listitem.
Thanks in advance.
Code:
Imports Microsoft.VisualBasic
Public Class cboAddItem
Public Value As String
Public Item As String
Public Sub New(ByVal NewItem As String, ByVal NewValue As String)
Value = NewValue
Item = NewItem
End Sub
Public Overrides Function ToString() As String
Return Item
End Function
End Class
I then use this in my page code:
Code:
cboBusinessCategory.Items.Add(New cboAddItem("Show All", "1"))
What am I missing or doing wrong? I get the intellisense error overload, add cannot be called with these arguments. cboAddItem can not be converted to string/listitem.
Thanks in advance.