Can someone help, I have an Xdocument that opens the XML files on disk and returns it to the view in asp.net mvc ... Everything works fine.
The problem is that I need to manipulate data using jquery, how do I pass this data, which is asp.net mvc for jquery?
that's what i have
XDocument xdoc = XDocument.Load(Server.MapPath("~/content/xml/items.xml"));
var test = from f in xdoc.Descendants("categoria") select f;
return view(test);
Basically, an XML file is a list of elements, as the user clicks on a category, and then I show something in the right column, and then someone clicks on another category in the element in the right column, it is replaced with new data. I have code in jquery / javascript to do this ...
All of this data is available in my xdocument XML document. I could, of course, make a message to the controller on the click event and return new data ... but I want this to be possible without any calls to the server
I think that basically I need to save the XML file that I have in asp.net mvc into a javascript variable so that I can manipulate it using jquery ..
Any help really appreciated
source
share