I am new to VB.Net and I have a dropdown where I need to show some values but it should have space in it.
I think we cannot use spaces in enum as they are identifiers. Below is what I have till now
<td><asp:Label ID="Label1" runat="server" Text="Live:" /></td>
<td><asp:DropDownList ID="cbxUrlVersion" runat="server" Width="15%" onchange ="checkboxStatus();"/></td>
.aspx.vb file
clsGlobal.BindComboToEnum(cbxUrlVersion, GetType(SIM_BusinessObjects.Enumerations.WebSiteVersion))
Enum File:
Public Enum WebSiteVersion
UseV9 = 1
Usev10 = 2
End Enum
I looked into this solution Space in enum but it did not help me. Please guide me here.1
EDIT
Public Enum WebSiteVersion
<Description("Use V9")>
UseV9 = 1
<Description("Use V10")>
Usev10 = 2
End Enum
Aucun commentaire:
Enregistrer un commentaire