Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 27th, 2006, 06:51 PM
Registered User
Join Date: May 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default use datalist via xml to show picture in output

Using Visual Studio 5.0 & c#, I have a standard XML file that I am loading into a .NET Datalist. One of the elements in the XML is the name of the accompanying image, e.g. 'xyz.jpeg'. However, when I run the aspx, it puts everything in <span> tags and just outputs the text 'xyz.jpg'

1- Is there a default method already arranged to display picture elements (from the xml) in a DataList control?

2-If not, I came to a partial workaround by inputting this directly into the XML file itself: (I coudln't get the CDATA tag to work)

      <userComment rating="4"
          comment="&lt;/span&gt;&lt;img src=&quot;Family-Crest.jpg&quot; align=&quot;left&quot;&gt; Best translation I've read." />
      <userComment rating="2"
          comment="I like other versions better." />

which is just basically closing .NET's <span> tag so the picture gets translated as plain html. Problem is I can't get the text 'Best translation... etc' to wrap around the image as it is not technically in the same cell etc.

What is the best way to accomplish the end result?

(Here is the DataList layout I am trying to get to:)
  PIC | text text text text text
  PIC | texttext text text etx tex
  PIC | text testestextext textex
textex text text text tex tex text
text text text text.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show text in datalist while value in NULL nittin14 ASP.NET 1.0 and 1.1 Basics 4 September 1st, 2007 06:28 PM
Can Crystal Report show dynamic picture? mohitchawla3 Crystal Reports 0 November 17th, 2006 02:43 AM
show the picture in a small icon on a report Corey Access 1 October 15th, 2005 02:52 PM
Show table in DataList miguel.ossa ASP.NET 1.0 and 1.1 Basics 1 February 26th, 2004 10:29 AM
How to show picture phoenixcu Access 1 June 10th, 2003 11:26 AM

All times are GMT -4. The time now is 04:37 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.