Populating a BulletedList control from the database

Greetings all,

I don't know what I am doing wrong but I am trying to populated bullutedlist with all date values from the db so that users can click on the dates to be redirected to edit page.

Basically, we have startDate and Enddate as filter for our reports.

Assume that we have a report on the db tha thas 9/25/2009 as start date and 10/2/2009 as EndDate.

I want to display the dates like 9/25/2009 - 10/2/2009 use linkbutton control to display them so that a user can click on a date range to be redirected as stated above.

So far, even though I am not getting any errors, the nothing is getting displayed on the screen.

Still learning; so thanks a lot for your patience and assistance.

Here is what I have so far.
html code
    <asp:BulletedList ID="bltLstReportDates" OnClick="bltLstReportDates_Click" DisplayMode="LinkButton" runat="server">
     </asp:BulletedList>

codeBehind:
   Protected Sub bltLstReportDates_Click(ByVal sender As Object, ByVal e As BulletedListEventArgs)

        Dim Conn As SqlConnection
        'Dim param As OleDbParameter
        Dim cmdcommand As SqlCommand

        Conn = New SqlConnection("data source = StPaaul;initial catalog = JITB;Integrated Security=SSPI;")
        Conn.Open()
        Dim SQLSTMT As String = "Select * from CrimeReportsData ORDER BY EndDate DESC"
        Dim selectedGroupID As String = bltLstReportDates.Items(e.Index).Value
        ' Rest of code or DataSource SelectCommand assignment goes here

        Response.Redirect([String].Format("EditReport.aspx?ReportGroupID={0}&bltLstReportDates={1}"))

Open in new window

simflexAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CodeCruiserCommented:
Is the question about populating the list or making the list items as links?
0
simflexAuthor Commented:
both so that if I click one of the links, it takes me to an edit page.

That's my intent anyway but if I can get the items populated, and with links, i will appreciate it.

Thanks to both of you for your assistance.
0
CodeCruiserCommented:
0
simflexAuthor Commented:
Thanks to both of you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.