?
Solved

Wrap text around image in datalist

Posted on 2007-07-30
1
Medium Priority
?
851 Views
Last Modified: 2009-02-23
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:

 <div>
            <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1">
                <ItemTemplate>
                    <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>
                             </ItemTemplate>
            </asp:DataList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:testingConnectionString %>"
                SelectCommand="SELECT [pictureURL], [text] FROM [imageWrap]"></asp:SqlDataSource>
        </div>
0
Comment
Question by:gogetsome
1 Comment
 
LVL 25

Accepted Solution

by:
nauman_ahmed earned 2000 total points
ID: 19592527
You can do this using CSS:

CSS Image Text Wrap
http://www.bigbaer.com/css_tutorials/css.image.text.wrap.htm

CSS Image Text Wrap Part 2
http://www.bigbaer.com/css_tutorials/css.image.text.wrap.tutorial.htm

--Nauman.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month14 days, 3 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question