What could be a best possible way for a loop insertion please?
I'll try to explain...........
I have got a List box with value as ID and text as Name.
Now What I want is loop through the List box and Insert into a database Table againt each ID.
Say Listbox has got
id=1 name=paul
id=2 name=jon
id=3 name=bell
I have got a Database Table (Groups)
When user hit the save button I want all the values in Groups table like
Group(TABLE FIELDS)
ID NAMEID
1 1(paul's id)
2 2(jon's id)
3 3(bell's id)
So how can loop through the List box, get an ID and fire an Insert command.
Hope you guys will help me
Regardsdim myListItem as ListItem
For Each myListItem in myListBox.Items
'do whatever you need to do, myListItem is the next listitem in the listbox
next
0 comments:
Post a Comment