Hallo, ich habe auf einer .aspx Seite eine unbestimmte Anzahl von Dropdown-Menus.
Wie kann ich später auch die IDs dieser Menüs zugreifen und wie fülle ich sie mit Daten?
Dies hat leider nicht funktioniert:
In der .aspx
C#-Quelltext
1: 2: 3: 4: 5: 6:
| <% foreach (Tag t in (List<Tag>)ViewState["Tags"]) { %> <tr><td><%= tag.Identifier %></td> <% %> <td><asp:DropDownList DataSource="<%# ModuleList %>" runat="server" DataDataTextField="Title" DataValueField="ID"></asp:DropDownList> </td></tr> <% } %> |
Die ArrayList ModuleList ist im Controller .aspx.cs definiert.
Danke für eure etwaige Hilfe,
mannyk