S
shapper
Hello,
I am working on a custom control and I am getting an error on one of my
properties:
"Conversion from type 'Unit' to type 'String' is not valid."
I am using the code which Visual Studio generates when I create a
custom control:
' InfoWidth
<Bindable(True), Category("Layout"), DefaultValue(100),
Localizable(True)> Property InfoWidth() As Unit
Get
Dim _InfoWidth As String = CStr(ViewState("InfoWidth"))
If _InfoWidth Is Nothing Then
Return String.Empty
Else
Return _InfoWidth
End If
End Get
Set(ByVal Value As Unit)
ViewState("InfoWidth") = Value
End Set
End Property
My property is of type WebControls.Unit.
Could someone help me out to solve this?
Thanks,
Miguel
I am working on a custom control and I am getting an error on one of my
properties:
"Conversion from type 'Unit' to type 'String' is not valid."
I am using the code which Visual Studio generates when I create a
custom control:
' InfoWidth
<Bindable(True), Category("Layout"), DefaultValue(100),
Localizable(True)> Property InfoWidth() As Unit
Get
Dim _InfoWidth As String = CStr(ViewState("InfoWidth"))
If _InfoWidth Is Nothing Then
Return String.Empty
Else
Return _InfoWidth
End If
End Get
Set(ByVal Value As Unit)
ViewState("InfoWidth") = Value
End Set
End Property
My property is of type WebControls.Unit.
Could someone help me out to solve this?
Thanks,
Miguel