This code works below but i want to do it with out a repeater because I only return one row in my query. How would i do this with out a repeater?

default.aspx.cs page

Picture dlPicture = new Picture();
DataTable DTPictures = dlPicture.GetRandomPicture();
rpPictureList1.DataSource = DTPictures;
rpPictureList1.DataBind(); Display.aspx page

default.aspx page

<asp:Repeater ID="rpPictureList3" runat="server">
            <ItemTemplate>
                <img src="Pictures/<%# DataBinder.Eval(Container.DataItem, "PicLoc") %>" alt="new pic" width="150" />
                <br />Rating: <%# DataBinder.Eval(Container.DataItem, "PicRating") %>% 
            </ItemTemplate>
        </asp:Repeater>

If you only return one row (and will only ever return one row) why don't you just use an image and label? That's about as simple as it can get.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.