Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 10, 2012 12:39 PM by kuber.manral
Apr 09, 2012 02:20 PM|LINK
I'm trying to concatenate two nodes with a pspace between them. They are First_Name & Last_Name. I tried the code below but it broke the bidning completely.
Text='<%# XPath("/people/person/@First_Name" + " " + "/people/person/@Last_Name" )
Apr 10, 2012 12:16 PM|LINK
Lets say you have an XML at XML/Customers.xml path.
On the server side if you write this.
XDocument xCustomers = XDocument.Load(Server.MapPath("XML//Customers.xml"));
IEnumerable<XElement> customer= (from en in xCustomers.Descendants("Customer")
foreach (XElement xE in customer)
txtXML.Text = xE.Element("FirstName").Value + " " + xE.Element("SurName").Value;
It should work.
This is not very good approch, but as your query is ver raw, this is what I can provide you with.
Apr 10, 2012 12:39 PM|LINK
This seems to target the Wrong XPath. If you want to pick First Name and Last Name both with a space, you should pick them seperately. I mean you should provide Xpath as a whole for each and then merger them later.
Hope it helps...