first .. you have to return the data to view mode ...
public ActionResult Search(int isbdn) { ViewData["ISBN"] = isbdn; string pathToXml= "http://isbndb.com/api/books.xml?access_key=DWD3TC34&index1=isbn&value1="; pathToXml += isbdn; var doc = XDocument.Load(pathToXml); IEnumerable<XElement> items = from m in doc.Elements() select m; return view(m); }
in your code behind you need to inherit
ViewPage < IEnumerable<XElement>>
and your ViewData.Modal will be strongly typed by IEnumerable<XElement> . and you can work with data, as in a controller.
source share