Problem with loop!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Private Sub PopulateDDLNoMobAccounts()
'assuming you have a button named ForLoop
Dim i As Integer
For i = 1 To 10
v_intNoMobilePhoneNumbers.Items.Insert(i, "i")
v_intNoMobilePhoneNumbers.Items.FindByText("i").Value = i
Next i
v_intNoMobilePhoneNumbers.DataBind()
v_intNoMobilePhoneNumbers.Items.Insert(0, "Select One")
v_intNoMobilePhoneNumbers.Items.FindByText("Select One").Value = 0
'insert don't create a value, but we need a value during defaults
v_intNoMobilePhoneNumbers.SelectedIndex = 0
End Sub
 
what is your question?

--
Regards,
Alvin Bruney [Microsoft MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
 
He asked it again 20 minutes later (this time with an actual
question)...check a couple messages up :)

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


Alvin Bruney said:
what is your question?

--
Regards,
Alvin Bruney [Microsoft MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ http://www.lulu.com/owc
----------------------------------------------------------


Tim::.. said:
Private Sub PopulateDDLNoMobAccounts()
'assuming you have a button named ForLoop
Dim i As Integer
For i = 1 To 10
v_intNoMobilePhoneNumbers.Items.Insert(i, "i")
v_intNoMobilePhoneNumbers.Items.FindByText("i").Value = i
Next i
v_intNoMobilePhoneNumbers.DataBind()
v_intNoMobilePhoneNumbers.Items.Insert(0, "Select One")
v_intNoMobilePhoneNumbers.Items.FindByText("Select One").Value = 0
'insert don't create a value, but we need a value during defaults
v_intNoMobilePhoneNumbers.SelectedIndex = 0
End Sub
 

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

Back
Top