troubleshooting Question

Wrap text around image in datalist

Avatar of gogetsome
gogetsomeFlag for United States of America asked on
1 Comment1 Solution884 ViewsLast Modified:
Hello. I have a datalist which contains a hyperlink with an imageURL and a label control. Both controls get their data from a sqldatasource. Currently the image is displayed and then on the next line the text is displayed.

I need to know how to wrap the text around the image... How can I accomplish this task?

Here is my code:

            <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1">
                    <asp:HyperLink ID="HyperLink1" NavigateUrl="~/Default.aspx" ImageUrl='<%# Eval("pictureURL") %>'
                        runat="server">Waterfall</asp:HyperLink><br />
                    <asp:Label ID="textLabel" runat="server" Text='<%# Eval("text") %>'></asp:Label>
            </asp:DataList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:testingConnectionString %>"
                SelectCommand="SELECT [pictureURL], [text] FROM [imageWrap]"></asp:SqlDataSource>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros