Step through controls doesn't see second dropdown menu
I have an ASP.net table. In multiple cells, I have two dropdowns. The item selected in each dropdown must be populated from the SQLServer 2005 database. To do this in my code, I go through the controls in each cell of the table. The code sees the first dropdown menu and fills it, then moves on to the next cell.
My ASP
<asp:TableRow runat="server" ID="rowEnglish">
<asp:TableCell ID="celCourseEnglish" runat="server">
<asp:DropDownList ID="ddlCourseEnglish" runat="server" AutoPostBack="True">
<asp:ListItem Value="0">English</asp:ListItem>
</asp:DropDownList>
<br />
<asp:DropDownList ID="ddlCommentEnglish" runat="server" Font-Size="X-Small" DataSourceID="sqlDS_comment" DataTextField="comment" DataValueField="id" Width="125px">
</asp:DropDownList>
my VB
For Each rowTemp In dtScores.Rows
Dim tblRow As TableRow
For Each tblRow In tblProgReport.Rows
Dim celTemp As New TableCell
For Each celTemp In tblRow.Cells
Dim ctl As Control
For Each ctl In celTemp.Controls
If TypeOf ctl Is DropDownList Then
Dim ddlTemp As DropDownList = CType(ctl, DropDownList)
'select value from dropdown list
I tried to reorder the controls in the cell and the course dropdown was still visible. Tried removing the courses dropdown and then the comments dropdown displays correctly. It's all about the content placeholder from the home page. Not sure why the second dropdown is not visible.
thanks
0
a source to share