Author: RDO | Posted on: 8/27/2009 7:56:56 AM | Views : 258

Hello,
I am using a databound dropdown list to display a list of dates from my DB using the following code:
<asp:DropDownList ID="PDevotionList1" runat="server" ></asp:DropDownList> <asp:Button ID="Button1" runat="server" Text="Get Devotional" />


Dim ddDR As SqlDataReader = Nothing Dim ddSqlConnection As New SqlConnection("Data Source=********;Initial Catalog=********;Persist Security Info=True;User ID=*******;Password=********") Dim ddSqlCommand As New SqlCommand("SELECT BDate FROM DEVOTION WHERE (BDate < '" + dt + "') ORDER BY BDate DESC", ddSqlConnection) ddSqlConnection.Open() ddDR = ddSqlCommand.ExecuteReader(CommandBehavior.CloseConnection) PDevotionList1.DataSource = ddDR PDevotionList1.DataTextField ...

Go to the complete details ...