Reputation: 89
I need an ASP.Net control on your property you can specify an array type string. That is, in my ASP.Net control would have something like:
DefaultValue("")> Category("Misc"), <Bindable(True),
Public Overridable Property MyProperty () As String ()
Get
Return mMyProperty
End Get
Set (ByVal value As String ())
mMyProperty = value
End Set
End Property
And from the ASP.Net page I need to pass the values, type:
<WC:MyControl MyProperty="1,2,4" runat="server" />
The message error is: Cannot create an object of type 'System.String[]' from its string representation '1,2,4' for the 'MyProperty' property.
Upvotes: 2
Views: 3514
Reputation: 32343
You need to implement a TypeConvertor
for this.
These resources could help you with it:
Upvotes: 5