473,383 Members | 1,876 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,383 software developers and data experts.

Eval a field in a Xpath Filtered Data Source

Hello,

I'm working on Visual Web Developper (ASPX with C# code Behind)

I would like to fill a DataList with items using this format (with as
item as elements) :
"file[title] - element[value]", example : "MyTitle - Theme A"

The problem is that labels, which are binded to theses fields, return
me an error :
"DataBinding: 'System.Web.UI.WebControls.XmlDataSourceNodeDescri ptor'
does not contain a property with the name 'title'."
"DataBinding: 'System.Web.UI.WebControls.XmlDataSourceNodeDescri ptor'
does not contain a property with the name 'value'."

Do you know how can I define the wanted fields in Eval Expression ?
To do this, I have :
- Created a DataList
- Associated it with an XML DataSource.
- Filtered this XML with an XPath Expression : "//file[@id="3"]//."
(This expression return the file node with all his children.)
- Created a label object, with a DataBinding to title field :
"Eval("title")"
- Created a label object, with a DataBinding to child value field :
"Eval("value")"
Here is my XML Datasource.

<files>
<file id="3" name="myName" nbSlides="10" title="MyTitle">
<element id="1" type="theme" value="Theme A" slide_start="2"
slide_end="4" />
<element id="2" type="theme" value="Theme B" slide_start="5"
slide_end="5" />
<element id="3" type="theme" value="Theme C" slide_start="6"
slide_end="9" />
</file>
</files>

Thanks a lot for any help !

Aug 16 '06 #1
0 962

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

Similar topics

6
by: Ramon M. Felciano | last post by:
Helo all -- I'm trying to gain a deeper understand for what type of semi-declarative programming can be done through XML and XPath/XSLT. I'm looking at graph processing problems as a testbed for...
3
by: MX1 | last post by:
I have a query written in MS Access that has a few calculated fields. Is it possible to refer to that query in a form field. I'd like the form field to show the sum of one of the columns from the...
3
by: John young | last post by:
I have been looking for an answer to a problem and have found this group and hope you can assist . I have been re doing a data base I have made for a car club I am with and have been trying to...
4
by: Søren Lund | last post by:
Hello, I am trying to bind a DataGrid with some data from a DataSet which contains fields in the form "group.fieldname". I am certain that my data source contains the field but I cannot get my...
9
by: David Thielen | last post by:
Hi; I am sure I am missing something here but I cannot figure it out. Below I have a program and I cannot figure out why the xpath selects that throw an exception fail. From what I know they...
1
by: Owen Blacker | last post by:
I've spent loads of time Googling to try to work this one out and I'm sure it's something obvious. I get an InvalidOperationException reading "Databinding methods such as Eval(), XPath(), and...
1
by: Sergey Dubinets | last post by:
In effort to prioritize our goals we composed the list of random features each of them may add value to set of XSLT tools offered from Microsoft. 1. XSLTc (Compiler for XSLT...
7
by: Katherine | last post by:
I'm trying to filter the records on the mainform (MailingList) of my database using a field contained in a subform (Donations). I was basing my code off Allen Browne's Access Tips page (here:...
3
by: isoquin | last post by:
I've looked, and not found much. I have a text field in a form named , which acquires its data through a control source of =getLocation() the getLocation() function returns a DLookup, which...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.