首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

为什么会报这样的异常,哪位高手能帮小弟我看看。

2012-05-28 
为什么会报这样的错误,谁能帮我看看。。SiteMapNode currentNode SiteMap.CurrentNode.Clone(true)//这段

为什么会报这样的错误,谁能帮我看看。。
SiteMapNode currentNode = SiteMap.CurrentNode.Clone(true);

//这段语句显示错误:未能将对象引用到实例

  SiteMapNode nowNode = currentNode;
  nowNode.Url = "~/Default.aspx";
  nowNode.Title = "开始";
  if ((nowNode = nowNode.ParentNode) != null)
  {
  nowNode.Title = "新开始";
  nowNode.Url="http://www.baidu.com/";
  }
  return currentNode;


[解决办法]
SiteMap.CurrentNode

这俩有个是NULL

热点排行