I have the following method in controller
public ActionResult Categorized()
{
var x=new Test.Models.MobileClass();
return View(x);
}
x object contains methods that return xmldocument data
how can I pass this object to view to access methods and display data from xmldocument in browser
I can display it element element by using the following code
document.writeln("@Model.getxml().ChildNodes.Count");
but I want to use for loop displaying the contents of object and the following code didn't work in javascript
var size=parseInt("@Model.Getxml().ChildNodes.Count");
for (var i=0; i<size; i++)
{
document.writeln("@Model.Getxml().ChildNodes[i].InnerText");
}
can you help me please