Public Sub BuildAccordion()
Dim dt As DataTable = ListData1.DefaultView.ToTable("MyPanes", True, New [String]() {"Screen_no", "Screen_desc"})
For Each row As DataRow In dt.Rows
Dim myStrExpr As String
myStrExpr = "screen_no = " & row("Screen_no").ToString
Dim lbScreen As New ListBox
For Each row1 As DataRow In ListData1.Select(myStrExpr)
lbScreen.Items.Add(New ListItem(row1("Floor/Location/Position").ToString, "Seat_no"))
Next
CreateAccPane(row("Screen_desc").ToString, row("Screen_desc").ToString, lbScreen)
Next
End Sub
Public Sub CreateAccPane(ByVal PaneID As String, ByVal PaneHeader As String, ByVal PaneContent As ListBox)
Dim panel1 As AccordionPane = New AccordionPane
panel1.ID = PaneID
panel1.HeaderContainer.Controls.Add(New LiteralControl(PaneHeader))
panel1.ContentContainer.Controls.Add(PaneContent)
AccPositions.Panes.Add(panel1)
End Sub
ASKER
ASKER
The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications
TRUSTED BY
This article on 4guysfromrolla.com might provide you with some insight - http://www.4guysfromrolla.com/articles/092904-1.aspx.
I would try to avoid using dynamic controls if I were you. They can quickly turn into a headache.