473,382 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

XmlDataSource and embeded HTML within your XML data

Hi,

I am attempting to right a news scroller control that is driven by and XML
file. The way I have it set up is:

<News>
<Item Title="sometitle">
html content goes here
</Item>
</News>

My hope was to be able to put the html for each news post in the middle of
the Item elememts and then fetch those using an asp:DataList. Well everything
works except that I loose my html tags. I get all the text but don't get
links, formating, etc...

I am using <%#XPath(".") %> to fetch the html content from the Xml in my
DataList control. Is there a way to have the html tags make it to the browser
using this setup?

Thanks,

Ryan
Jun 16 '06 #1
2 1438
Hi,

Sleazy wrote:
Hi,

I am attempting to right a news scroller control that is driven by and XML
file. The way I have it set up is:

<News>
<Item Title="sometitle">
html content goes here
</Item>
</News>

My hope was to be able to put the html for each news post in the middle of
the Item elememts and then fetch those using an asp:DataList. Well everything
works except that I loose my html tags. I get all the text but don't get
links, formating, etc...

I am using <%#XPath(".") %> to fetch the html content from the Xml in my
DataList control. Is there a way to have the html tags make it to the browser
using this setup?

Thanks,

Ryan


I think that you need a CDATA section.
http://www.w3schools.com/xml/xml_cdata.asp

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 17 '06 #2
Thanks Laurent for your input.

Hi Ryan,

I agree with Laurent that you will need a CDATA section to store the HTML
content. Please feel free to post here if you need more help and anything
is unclear.
Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: mike | last post by:
can somebody please show me some code that will let me populate a checkboxlist from the xmldatasource, and have the text property set to the names in the xml file thanks you can also email me...
1
by: Thor W Hammer | last post by:
Is it possible to use XmlDataSource control to transform a xml-file to html and having the html rendered on the page? Kind regards, Twh
2
by: Thor W Hammer | last post by:
Is it possible??
6
by: Dominique | last post by:
Hi all, I'm using .NET v1.1 and the scenario I have is as follows... I have IE as an ActiveX control embedded in may C# App. I generate a HTML file dynamically and within the HTML file I embed a...
3
by: Brian | last post by:
Using external XML, I'm trying to build a quiz, but I can't seem to specify the DataSource for the RadioButtonList within a Repeater ItemTemplate. I've tried a number of approaches, but I haven't...
2
by: sck10 | last post by:
Hello, How do you set the website proxy using the XmlDataSource control? Thanks, sck10
1
by: zvickery | last post by:
Currently I have a project where multiple pages share a master page and also share a common XmlDataSource. Within the various pages, there are controls (such as DropDownLists) that I would like to...
8
by: Wessel Troost | last post by:
We are using an XML data source in the Page_Load event of an ASP.NET page, like: protected void Page_Load(object sender, EventArgs e) { // Retrieve XML from web service for product idea in URL...
1
by: Sean | last post by:
I am experiencing a strange problem using the XMLDataSource and DataList controls which I cannot seem to resolve. I am using the controls to read and display a variety of RSS feeds. On my local...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.