1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| <asp:SqlDataSource ID="SqlDataEtudiant" runat="server"
ConnectionString="<%$ ConnectionStrings:BDGISConnectionString %>"
SelectCommand="SELECT [Id_Cycle], [Id_Filiere] FROM [Etudiants]"></asp:SqlDataSource>
<asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataEtudiant">
<ItemTemplate>
Cycle:
<asp:SqlDataSource ID="SqlDataCycle" runat="server"
ConnectionString="<%$ ConnectionStrings:BDGISConnectionString %>"
SelectCommand="SELECT * FROM [Cycles]"></asp:SqlDataSource>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
DataSourceID="SqlDataCycle" DataTextField="Libelle_Cycle"
DataValueField="Id_Cycle" SelectedValue='<%# Bind("Id_Cycle") %>'>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataFiliere" runat="server"
ConnectionString="<%$ ConnectionStrings:BDGISConnectionString %>"
SelectCommand="SELECT * FROM [Filieres] WHERE ([Id_Cycle] = @Id_Cycle)">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="Id_Cycle"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<br />
Filiere:
<asp:DropDownList ID="DropDownList2" runat="server"
DataSourceID="SqlDataFiliere" DataTextField="Libelle_Filiere"
DataValueField="Id_Filiere" AutoPostBack="True"
onselectedindexchanged="DropDownList2_SelectedIndexChanged">
</asp:DropDownList>
<br />
</ItemTemplate>
</asp:FormView>
<asp:GridView ID="GridView1" runat="server">
</asp:GridView> |
Partager