简体   繁体   English

如何将xml数据从控制器传递到视图

[英]How can I pass xml data from the controller to the view

public ActionResult Details()
{
    XElement xml = 
         new XElement("persoanldetails", from i in dbContext.Personaldetails
                                                   where i.ID == 1 select i);
    return View(xml);
}

I have created an XElement in the controller. 我已经在控制器中创建了XElement It converts my data in the database to xml. 它将数据库中的数据转换为xml。 Now I want to use this xml object to load the grid in dhtmlx. 现在,我想使用此xml对象在dhtmlx中加载网格。

How can I retrieve the xml object in the view? 如何在视图中检索xml对象?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM