rafaelrgl
asked on
How to get months names
hi i build this function below to populate an dropdownlist:
Dim dt As System.Globalization.DateT imeFormatI nfo = System.Globalization.Cultu reInfo.Cur rentCultur e.DateTime Format
Dim ditem As New ListItem
ditem.Text = "Mês"
ditem.Value = -1
ditem.Selected = True
ddl_mes.Items.Add(ditem)
For t As Integer = 1 To 12
Dim ditem2 As New ListItem
ditem2.Text = dt.GetAbbreviatedMonthName (t)
ditem2.Value = t
ditem2.Selected = False
ddl_mes.Items.Add(ditem2)
Next
but the months are in english, and i want the months to be on the language that the user has choose on his computer or webbrowser.
any help?
Dim dt As System.Globalization.DateT
Dim ditem As New ListItem
ditem.Text = "Mês"
ditem.Value = -1
ditem.Selected = True
ddl_mes.Items.Add(ditem)
For t As Integer = 1 To 12
Dim ditem2 As New ListItem
ditem2.Text = dt.GetAbbreviatedMonthName
ditem2.Value = t
ditem2.Selected = False
ddl_mes.Items.Add(ditem2)
Next
but the months are in english, and i want the months to be on the language that the user has choose on his computer or webbrowser.
any help?
ASKER
sorry, did not work. any other suggestion?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
ditem2.Text = System.Globalization.DateT