Bonjour,
J'ai ajouté deux DropDownList,que j'ai les liée avec 2 datasource sql,mais la deuxième est en fonction de la première.select col1 where col2=dropDownList1
mais ca pas fonctionné(la deuxieme liste reste vide) parce que apres le choix de la 1ere valeur aucun evenement va lancer le chargement de la deuxième liste.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
  <asp:DropDownList ID="DropDownList2" runat="server" 
                        DataSourceID="SqlDataSource2" DataTextField="FAMILLE" DataValueField="FAMILLE">
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:Base-Ets-MtiriConnectionString %>" 
                        SelectCommand="SELECT [FAMILLE] FROM [ARTICLE]"></asp:SqlDataSource>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    Désignation d'article&nbsp;&nbsp;
                    <asp:DropDownList ID="DropDownList1" runat="server" 
                        DataSourceID="SqlDataSource1" DataTextField="DESIG" DataValueField="DESIG">
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:Base-Ets-MtiriConnectionString %>" 
                        SelectCommand="SELECT [DESIG] FROM [ARTICLE] WHERE ([FAMILLE] = @FAMILLE)">
                        <SelectParameters>
                            <asp:FormParameter FormField="DropDownList2" Name="FAMILLE" Type="String" />
                        </SelectParameters>
                    </asp:SqlDataSource>