Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何通过DevExpress使用Treeview浏览网站_C#_Asp.net Mvc_Treeview_Devexpress_Devexpress Mvc - Fatal编程技术网

C# 如何通过DevExpress使用Treeview浏览网站

C# 如何通过DevExpress使用Treeview浏览网站,c#,asp.net-mvc,treeview,devexpress,devexpress-mvc,C#,Asp.net Mvc,Treeview,Devexpress,Devexpress Mvc,我目前正在使用DevExpress的TreeView,它用于在我的ASP mvc站点中导航 然而,在阅读时,我似乎找不到任何实际导航的参考,特别是当我从xml文件绑定数据时 MyContentLeftPartialView <div class="leftPanel"> @* DXCOMMENT: Configure the left panel's treeview *@ @Html.DevExpress().TreeView(settings =>

我目前正在使用DevExpress的TreeView,它用于在我的ASP mvc站点中导航

然而,在阅读时,我似乎找不到任何实际导航的参考,特别是当我从
xml
文件绑定数据时

My
ContentLeftPartialView

<div class="leftPanel">
        @* DXCOMMENT: Configure the left panel's treeview *@
    @Html.DevExpress().TreeView(settings => {
        settings.Name = "LeftTreeView";
    }).BindToXML(HttpContext.Current.Server.MapPath("~/App_Data/SideMenu.xml"), "/menu/*").GetHtml()
</div>
我完全不知道我应该在哪里放置
操作链接
/等,以便我能够在我的整个网站中导航(此面板将在所有页面中保持不变)

有没有人有过使用DevExpress HTML 5/MVC的经验,可以为我指明正确的方向

我知道另一个项目使用了这个:

 public ActionResult Products()
        {
            ViewBag.Message = "Your Products page.";

            return View();
        }
但它只是使用了如下链接:

 <li>@Html.ActionLink("Products", "Index", "Products")</li>
  • @Html.ActionLink(“产品”、“索引”、“产品”)

  • 我认为DevExpress的treeview在局部视图中不会出现这种情况。

    我发现了如何在xml文件中使用
    NavigateUrl
    进行导航,尽管这并不是我想要放置它的确切位置(我更愿意动态添加它)

    但是,使用:

     <group Text="Graphics">
        <item Text="General Overview" NavigateUrl="/mygraphicsPage"/>
     </group>
    
     <group Text="Graphics">
        <item Text="General Overview" NavigateUrl="/mygraphicsPage"/>
     </group>
    
    NavigateUrl="myurl" to the items.