在页面中直接设计TreeView的节点而不使用Web.Sitemap文件在运行时出错

在页面中直接设计TreeView的节点而不使用Web.Sitemap文件在运行时出错,如果使用Web.sitemap文件(Web.seitemap文件的内容是:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode url="~/default.aspx" title="Home">       
  </siteMapNode>
</siteMap>),此时就不会报错了,不知是什么原因?难道使用TreeView一定要使用Web.sitemap吗?
导航控件的TreeView和Web.sitemap两者一定要搭配使用吗?
原文地址:https://www.cnblogs.com/edrp/p/671276.html