Asp.net bulletlist with graphics

Posted on 2011-10-03
Medium Priority
Last Modified: 2012-06-21
Hi Experts

I have a bullet list in asp.net which is data bound, the list is a a user guide, what I want to do is show the list but include a graphic (graphic to be at the end of the text not the actual bullet itself), I have the image name in the db, does anyone know of a control that can do this?
Question by:MrDavidThorn
  • 2
LVL 17

Accepted Solution

Carlos Villegas earned 2000 total points
ID: 36906578
Hi, I did this example for you, try it:
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

    protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            // Test data...
            DataTable dtt = new DataTable();
            dtt.Columns.Add("MyText", typeof(string));
            dtt.Columns.Add("MyImage", typeof(string));
            dtt.Rows.Add("My record 1", "Graphic1.gif");
            dtt.Rows.Add("My record 2", "Graphic2.gif");
            dtt.Rows.Add("My record 3", "Graphic1.gif");
            Repeater1.DataSource = dtt;

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <form id="form1" runat="server">
    <asp:Repeater ID="Repeater1" runat="server">
                <%# Server.HtmlEncode(Eval("MyText").ToString()) %>
                <img src="/Images/<%# Eval("MyImage") %>" alt="" />

Open in new window

You can download the aspx file from this link:

You got the idea?
LVL 17

Expert Comment

by:Carlos Villegas
ID: 36906583
The namespace System.Data.OleDb in the example is not required:
<%@ Import Namespace="System.Data.OleDb" %>

Open in new window

Copy/Paste error :p

Author Comment

ID: 36908625
thanks dude

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

862 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