Bonjour,
J'ai 2 sqlDataSources je veux utiliser un champs de la 1ière comme paramètre de la 2ième, le voilà ce que j'ai fait:
alors j'ai récupérer le code_filiale avec le databinder à l'intérieur de sqldatasource(voir en rose) , mais ça me donne une erreur
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
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 <asp:ScriptManager ID="SM1" runat="server" /> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GE_igaConnectionString %>" SelectCommand="SELECT [Code_filiale], [libele_filiale], [description] FROM [Filiale]"></asp:SqlDataSource> <asp:Repeater ID="rep1" DataSourceID="SqlDataSource1" runat="server"> <ItemTemplate> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:GE_igaConnectionString %>" SelectCommand="SELECT [Code_option], [libelle_option] FROM [Option] WHERE ([code_filiale] = <%#DataBinder.Eval(Container.DataItem, "Code_filiale")%> "> <SelectParameters> <asp:Parameter Name="code_filiale" Type="String" /> </SelectParameters> </asp:SqlDataSource> <asp:Panel ID="myPanel" runat="server" BackColor="Lime" BorderWidth="1px"> <%#DataBinder.Eval(Container.DataItem, "libele_filiale")%> </asp:Panel> <asp:Panel ID="HoverPanel" runat="server"> <asp:Repeater ID="rep2" DataSourceID="SqlDataSource2" runat="server"> <ItemTemplate> <%#DataBinder.Eval(Container.DataItem, "libelle_option")%> <br /> </ItemTemplate> </asp:Repeater> </asp:Panel> <ajaxToolkit:HoverMenuExtender ID="hme" runat="server" TargetControlID="myPanel" PopupControlID="HoverPanel" /> </ItemTemplate> </asp:Repeater>
Merci d'avance![]()
Partager