[DEBUTANT] recuperer 3 valeur d'un DropDownList avec SMARTPART
Bonjour
je souhaiterai recuperer les resultats de mes dropdownlist pour les affectés a une autre webpart
Voici mon code
PAGE Filtre.ASCX
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| <%@ Control Language="C#" AutoEventWireup="true" CodeFile="Filtre.ascx.cs" Inherits="Filtre" %>
<div>
<asp:DropDownList ID="DDL_site" runat="server" AutoPostBack="True" DataSourceID="SQL_site" DataTextField="site" DataValueField="site"></asp:DropDownList>
<asp:SqlDataSource ID="SQL_site" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectSQLBase %>" SelectCommand="SELECT site FROM site"></asp:SqlDataSource>
<asp:DropDownList ID="DDL_month" runat="server" AutoPostBack="True" DataSourceID="SQL_month" DataTextField="month" DataValueField="month"></asp:DropDownList>
<asp:SqlDataSource ID="SQL_month" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectSQLBase %>" SelectCommand="SELECT month FROM month ORDER BY month_num"></asp:SqlDataSource>
<asp:DropDownList ID="DDL_year" runat="server" AutoPostBack="True" DataSourceID="SQL_year" DataTextField="year" DataValueField="year"></asp:DropDownList>
<asp:SqlDataSource ID="SQL_year" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectSQLBase %>" SelectCommand="SELECT year FROM year"></asp:SqlDataSource>
</div> |
PAGE Filtre.ascx.cs
Code:
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
| using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Serialization;
using System.ComponentModel;
using Microsoft.SharePoint.WebPartPages;
using SmartPart;
public partial class Filtre : System.Web.UI.UserControl,IConnectionProviderControl
{
#region IConnectionProviderControl Members
object IConnectionProviderControl.GetProviderData()
{
return DDL_site.SelectedValue;
}
string IConnectionProviderControl.ProviderMenuLabel
{
get
{
return "Site_Selectionner";
}
}
#endregion
} |
Pour le moment mon code me retourne simplement la valeur de la DDL_Site mais je cherche a recuperer la valeur de DDL_Year et DDL_Month
Comment je peux faire ?
Merci pour votre aide
J'ai essayé avec des variables dans un tableau mais bon sans resultat