xml内容:
<?xml version="1.0"?>
<TREENODES>
<TREENODE TEXT="スーバーユーザ">
<TREENODE TEXT="プロジェクト" />
<TREENODE TEXT="アプリケーション" />
</TREENODE>
</TREENODES>aspx.cs内容:
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="WebApplication1.WebForm1" %>
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<FONT face="MS UI Gothic">
<iewc:TreeView id="TreeView1" runat="server" TreeNodeSrc="TreeData.xml"></iewc:TreeView></FONT>
</form>
</body>
</HTML>
一直会出现[The data at the root level is invalid. Line 1, position 1.]这个异常
各位老大,来看看怎么回事啊?
<?xml version="1.0"?>
<TREENODES>
<TREENODE TEXT="スーバーユーザ">
<TREENODE TEXT="プロジェクト" />
<TREENODE TEXT="アプリケーション" />
</TREENODE>
</TREENODES>aspx.cs内容:
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="WebApplication1.WebForm1" %>
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<FONT face="MS UI Gothic">
<iewc:TreeView id="TreeView1" runat="server" TreeNodeSrc="TreeData.xml"></iewc:TreeView></FONT>
</form>
</body>
</HTML>
一直会出现[The data at the root level is invalid. Line 1, position 1.]这个异常
各位老大,来看看怎么回事啊?
解决方案 »
- 在UpdatePanel中response.Write(alert)是不会成功执行的,怎么回事?
- 分享一个“超强”的数据库访问类
- 为什么有的机器不能把弹出窗口window.open到显示器外面去
- [50 分急!] 如何设置DataList内的验证控件?
- 有些页面请求需要很长时间而导致超时,如何处理
- 由客户端用Java脚本取得HTML中的全部图片地址,怎么将这些地址传值到aspx页面并存到数据库啊?
- 请问我的系统为什么不能运行ASP。NET程序啊
- Public SqlReader 要用到using 的什么方法?
- 有关User.IsInRole的问题?
- 请问现在国内最好的采用C#技术开发的论坛是什么?在哪里有下载?
- ****我是菜鸟,谁帮我就给分****
- 怎样把文本文件、Excel或word文档中的数据保存到数据库或者提交到一个TextBox中?
http://community.csdn.net/Expert/TopicView.asp?id=3807434