Autor Beitrag
mannyk
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 83
Erhaltene Danke: 1



BeitragVerfasst: Mo 30.03.09 16:40 
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
ausblenden 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