cvb | Bonjour,
J'aimerais intégrer (dans la clause WHERE) de ma requête SQL la valeur des listes déroulantes...J'ai un peu de mal, je cherche sur le net je ne trouve rien, à part des @xxxx ... Je suis sous ASP.net...
SelectCommand="SELECT `Nom_Prosit`,
`Date_Creation`,
`Date_version`,
`libelle_modules`,
`libelle_fill` FROM `Prosit`,
`Modules`,
`Filliere`
WHERE Modules.id_Module=@Module_list AND
Filliere.id_fill=@Filliere"> |
Auriez-vous une idée de comment procéder ?
Code :
- <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <link rel="stylesheet" type="text/css" href="css/StyleSheet.css"media="screen" />
- <head runat="server">
- <script language="vb" runat="server">
- Sub Afficher_Resultat(ByVal sender As Object, ByVal E As EventArgs)
-
- End Sub
- </script>
- <title>GED</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <div id="Bloc_Search">
- <label>Date Creation :</label><br />
- <asp:DropDownList ID="Liste_Date" runat="server" CssClass="Largeur_Colonne">
- <asp:ListItem Value="2004">2004</asp:ListItem>
- <asp:ListItem Value="2005">2005</asp:ListItem>
- <asp:ListItem Value="2006">2006</asp:ListItem>
- <asp:ListItem Value="2005">2005</asp:ListItem>
- <asp:ListItem Value="2007">2007</asp:ListItem>
- </asp:DropDownList>
- <br /><br />
- <label>Modules :</label>
- <br />
- <asp:DropDownList ID="Module_list" runat="server" DataSourceID="ModuleSource" DataTextField="libelle_modules" DataValueField="id_modules" CssClass="Largeur_Colonne"></asp:DropDownList>
- <asp:AccessDataSource ID="ModuleSource" runat="server" DataFile="D:\Administrateur\Mes_documents\Visual Studio 2005\MonADO\WebSite1\prosit.mdb"
- SelectCommand="SELECT `id_modules`,`libelle_modules` FROM `Modules`"></asp:AccessDataSource>
- <br /><br />
- <label>Filliere :</label>
- <br />
- <asp:DropDownList ID="Filliere" runat="server" DataSourceID="FillereSource" DataTextField="libelle_fill" DataValueField="id_fill" CssClass="Largeur_Colonne"></asp:DropDownList>
- <asp:AccessDataSource ID="FillereSource" runat="server" DataFile="D:\Administrateur\Mes_documents\Visual Studio 2005\MonADO\WebSite1\prosit.mdb"
- SelectCommand="SELECT `id_fill`,`libelle_fill` FROM `Filliere`"></asp:AccessDataSource>
- <br /><br />
- <input id="Rechercher" type="button" value="Entrée" runat="server" onserverclick="Afficher_Resultat" />
- <h3><span id="fave" runat="server"></span></h3>
-
-
-
- <asp:GridView CssClass="Largeur_Grid" ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="Grid_Resultats">
- <Columns>
- <asp:BoundField DataField="Nom_Prosit" HeaderText="Prosit" SortExpression=""/>
- <asp:BoundField DataField="Date_Creation" HeaderText="Creat" SortExpression="" />
- <asp:BoundField DataField="Date_version" HeaderText="Version" SortExpression="" />
- <asp:BoundField DataField="libelle_modules" HeaderText="Modules" SortExpression="" />
- <asp:BoundField DataField="libelle_fill" HeaderText="Filliere" SortExpression="" />
- </Columns>
- </asp:GridView>
- <asp:AccessDataSource ID="Grid_Resultats" runat="server" DataFile="D:\Administrateur\Mes_documents\Visual Studio 2005\MonADO\WebSite1\prosit.mdb"
- SelectCommand="SELECT
- `Nom_Prosit`,
- `Date_Creation`,
- `Date_version`,
- `libelle_modules`,
- `libelle_fill`
- FROM `Prosit`,
- `Modules`,
- `Filliere`
- WHERE
- Modules.id_Module=@Module_list AND
- Filliere.id_fill=@Filliere">
- </asp:AccessDataSource>
-
- </div>
- </form>
- </body>
- </html>
|
D'avance merci
@+ |