> If Not IsPostBack Then > . > . > > Dim strConn As String = CType(Me.Master, MasterPage).connectString > Dim objConn As New MySqlConnection(strConn) > Dim objDS As New DataSet > > Dim strSql As String > strSql = "SELECT DISTINCT savedate FROM kpi_mrpactionsvalue " & _ > " ORDER BY savedate DESC LIMIT 10" > > Dim daDates As New MySqlDataAdapter(strSql, objConn) > daDates.Fill(objDS, "dtDates") > > For Each rowDate In objDS.Tables("dtDates").Rows > ddlDates.Items.Add(rowDate("savedate")) > Next > > . > .>
>< asp:DropDownList ID="ddlDates" runat="server" Height="20px" Width="107px" > DataSourceID="mysqldatasource" DataTextField="savedate" > DataValueField="savedate" > > < /asp:DropDownLis t > > >< asp:SqlDataSource ID="mysqldatasource" runat="server" > ConnectionString="< %$ ConnectionStrings:ConnectionString % >" > ProviderName="< %$ ConnectionStrings:ConnectionString.ProviderName % >" > SelectCommand="select distinct savedate from kpi_mrpactionsvalue order by savedate desc limit 10" > >< /asp:SqlDataSource >>