Developer technologies | VB
An object-oriented programming language developed by Microsoft that can be used in .NET.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm populating a dropdown with dates, it's currently showing the dates as
8/1/2022
7/1/2022
6/1/2022
5/1/2022
I want to show the dates as
5/1/2022
6/1/2022
7/1/2022
8/1/2022
protected sub getDates(sender as Object, e as EventArgs)
dim ddDates as New List(of ListItems)
for i = 1 to 4
beginDate = beginDate.AddMonths(-1)
' formats the dates here from variables creating the dates
next
with reportDropDown
.DataTextField = "text"
.DataValueField = "Value"
.DataBind()
end with
end sub
An object-oriented programming language developed by Microsoft that can be used in .NET.
A set of technologies in .NET for building web applications and web services. Miscellaneous topics that do not fit into specific categories.
just use
ddDates.Insert(0, value)
rather than add