Listbox Controls

E

Eelyak

classic vb6/asp perp here but have a asp.net
issue i am having. it boils down to this. 2 listbox with --> buttons
and <---
to move entry's back and forth. its an attendance sheet. the
..value="(studentID)" when i move them --> html source looks fine..

[Listbox1]
option selected="selected" value="92">Pete CxxxXXun</option>

[Listbox2]
<option value="94">Pete CXXxoun</option>

i click my test "Save" button routine
Response.Write(lb2.Items(i).Value & " <br />")
shows "94". All worked fine

now..
lb1 can have around 20 kids in it, so.. if i select 10 and --> then
view source all appears normal, hit "Save" output is fine. if then i
<--- remove one then ---> add another(any) i get
[Listbox1]
<option selected="selected" value="90">Hunter BXxXen</option>

[Listbox2]
<option value="90">Ayuk xxXXre</option>
<option value="Hunter BXxxXn">Hunter BrXxXxn</option>

i figure its in my ---> routine

Dim i, x
x = 0
For i = 0 To lb.Items.Count - 1
If lb.Items(i).Selected Then
lb2.Items.Add(lb.Items(i).Text)
lb2.Items.Item(x).Value = lb.Items(i).Value
x = x + 1
End If
Next

Anyone have an idea on how to fix it??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top