E
Eeediot
I am trying to write code that will go through the existing list items in a
listbox and perform a string comparision with a supplied string. That
particular item will automatically selected if there is a match. I am
trying to use the IndexOf method to accomplish this task but, alas, I have
been unsuccessful.
If anyone has any ideas or suggestions it would be much appreciated.
Yes, I am a newbie to ASP.NET.
Yes, I am a newbie to VB.NET.
I am familiar with ASP.Classic and maybe that's my problem.
Here's my code:
=====
Protected lstIncdType as ListBox
...
Dim j as Integer
Dim Thingy as ListItem
...
j = 0
For Each Thingy In lstIncdType.Items
If Thingy.Text = CompareString Then
j = IndexOf(What!?!) 'Offending Code...
Exit For
End If
Next
lstIncdType.SelectedIndex = j
...
=====
TIA
listbox and perform a string comparision with a supplied string. That
particular item will automatically selected if there is a match. I am
trying to use the IndexOf method to accomplish this task but, alas, I have
been unsuccessful.
If anyone has any ideas or suggestions it would be much appreciated.
Yes, I am a newbie to ASP.NET.
Yes, I am a newbie to VB.NET.
I am familiar with ASP.Classic and maybe that's my problem.
Here's my code:
=====
Protected lstIncdType as ListBox
...
Dim j as Integer
Dim Thingy as ListItem
...
j = 0
For Each Thingy In lstIncdType.Items
If Thingy.Text = CompareString Then
j = IndexOf(What!?!) 'Offending Code...
Exit For
End If
Next
lstIncdType.SelectedIndex = j
...
=====
TIA