I have created an application (in VB Express 2008) which allows me to distribute some useful web pages to users.
The problem I'm experiencing is sorting on ComboBox1 (renamed to PageName) and this then throws the URL Address combobox (ComboBox2) out of sequence.
Any help on this? Tried using the .Sorted etc, but I can't seem to get it sorting correctly.
This is in the OnLoad section of the VB page.
Dim WebLinks = (From line In IO.File.ReadAllLines("C:\Temp\URLList.csv") _
Where line.Length > 0 _
Let Items = line.Split(","c) _
Select New With _
{.URLName = Items(0), _
.URLLoc = Items(1) _
} _
).ToList
For Each URLSCut In WebLinks
Console.WriteLine("[{0} [{1}]", _
URLSCut.URLName, _
URLSCut.URLLoc _
)
Next
'ComboBox1
PageName.DataSource = WebLinks
PageName.DisplayMember = "URLName"
'ComboBox2
WebAdd.DataSource = WebLinks
WebAdd.DisplayMember = "URLLoc"