繁体   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);
}

我已经在控制器中创建了XElement 它将数据库中的数据转换为xml。 现在,我想使用此xml对象在dhtmlx中加载网格。

如何在视图中检索xml对象?

暂无
暂无

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

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