ASP.NET C# System.Linq.Enumerable+WhereSelectEnumerable Error

rocketguy87

New Member
Getting this weird LINQ error. title =System.Linq.Enumerable+WhereSelectEnumerableIterator`2[System.Xml.Linq.XElement,System.StringHere is the code I have:\[code\]if (Request.QueryString["Keywords"] != null){ string keywords = Request.QueryString["Keywords"]; string myAppID = "HIDDEN"; var xml = XDocument.Load("http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&SECURITY-APPNAME=" + myAppID + "&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&keywords=" + keywords + "&paginationInput.entriesPerPage=5"); XNamespace ns = "http://www.ebay.com/marketplace/search/v1/services"; var titles = from item in xml.Root.Descendants(ns + "title") select new{ title = xml.Descendants(ns + "title").Select (x => x.Value), }; foreach (var item in titles){ Label1.Text += item; } }\[/code\]Here what the XML looks like:\[code\]<findItemsByKeywordsResponse xmlns="http://www.ebay.com/marketplace/search/v1/services"><searchReslut count="5"><item> <title></title></item><item> <title></title></item><item> <title></title></item>\[/code\]Trying to get it to output correctly.
 
Back
Top