Hi there,
Can anyone help, I have got an Xdocument which opens an XML files on the disk and returns it to the view in asp.net mvc... Everything is working ok.
The problem being is that i need to manipulate the data with jquery, how do i pass this data which is asp.net mvc to jquery?
here is 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 the xml file is a list of items, so as the user clicks on a category then i display something in the right column, then someone clicks on another category on the item in the right column is replaced by new data. I have the code in jquery / javascript to do this...
All this data is available in my XML xdocument.. I could of course on the click event do a post to the server to a controller and return the new data .... but i want to be able to do this without any calls to the server
I think basically i need to store the xml file that i have in asp.net mvc into a javascript variable so that i can manipulate it with jquery..
Any help really appreciated