Results 1 to 2 of 2

Thread: Datalist Question

  1. #1

    Thread Starter
    Hyperactive Member Rocketdawg's Avatar
    Join Date
    Feb 2003
    Location
    Back in the doghouse
    Posts
    294

    Datalist Question

    Hi all

    Got a couple tables that I'm querying to hook up to a datalist.

    I'm using an inner join to pull a project description(1) from one table and the images(bunch) from another. All seemed to be right with the world.

    I wanted to have the project description in a header template and the images flowing below. The pictures are displayed fine. No project description.

    I write virtually no SQL - can anyone see if there's a problem
    Code:
    cmd_string As String = "Select Images.ImageURL,Images.ImageDescription,Projects.Description from Projects Inner Join Images on Projects.ProjectName = Images.ProjectName Where Images.ProjectName='" & ddlProjectList.SelectedValue & "'"
    The datalist is pretty straightforward:
    Code:
    <asp:Datalist ID="dlProjects" runat="server" RepeatColumns="1">
        <HeaderStyle Font-Bold="true" Font-Size="14px" HorizontalAlign="left" /> 
        <HeaderTemplate>
        <p>Project Photos<br /><%# Eval("Description") %></p>
        </HeaderTemplate>
        <ItemTemplate>
        <img style="border-bottom:solid 3px #156322;border-right:solid 2px #156322;border-left:solid 2px #156322;border-top:solid 2px #156322; margin:10px;" alt="" src="<%# Eval("ImageURL") %>" /><br /> 
        <span style="padding-left:6px; font-weight:600;"><%#Eval("ImageDescription")%></span>
        </ItemTemplate>
        </asp:Datalist>
    Any help appreciated. Thanks
    Last edited by Rocketdawg; Mar 23rd, 2007 at 12:38 PM. Reason: Resolved

  2. #2

    Thread Starter
    Hyperactive Member Rocketdawg's Avatar
    Join Date
    Feb 2003
    Location
    Back in the doghouse
    Posts
    294

    Re: Datalist Question

    Never mind, figured it out.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width