Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 show listbox items in div tag

Author  Topic 

bubberz
Constraint Violating Yak Guru

289 Posts

Posted - 2006-08-07 : 15:55:04
hello!

I need to show all the listbox items in a div tag in order to build an SQL statement we're going to use for webservices.

I can show the count of the items in this listbox, but can't seem to get exactly the syntax to print each to a div tag.
Below is what I've got so far (wrong of course) in the Page_Load event:

divSI.InnerHtml = ""
Dim i As Integer
For i = 0 To ListBox2.Items.Count - 1
divSI.InnerHtml = ListBox2.Items.Add()
Next

Thanks!

bubberz
Constraint Violating Yak Guru

289 Posts

Posted - 2006-08-07 : 16:18:43
got it with:

divSI.InnerHtml = ""
Dim i As Integer
For i = 0 To ListBox2.Items.Count - 1
divSI.InnerHtml += ListBox2.Items(i).Value
Next


Thanks!
Go to Top of Page
   

- Advertisement -