Does treeview works in .NET framework 1.1 using TreeNodeSrc to bind an XML file.

T

Thomas

abc.xml
=======
<TREENODES>
<treenode Expanded="true" Text="category 5">
<treenode Text="Report 1"
NavigateURL="http://www.abc.com"/>
<treenode Text="Report 2"
NavigateURL="http://www.bcd.com/"/>
</treenode>
</TREENODES>

abc.aspx
========
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<%@ Page Language="VB" ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<%@ Register TagPrefix="iewc"
Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls" %>
<%@ Import Namespace="Microsoft.Web.UI.WebControls" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.UI" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
</head>
<body>
<form runat="server">
<iewc:treeview runat="server" TreeNodeSrc="abc.xml" />
</form>
</body>
</html>

errors here
===========
Server Error in '/' Application.
-----------------------------------------------------------
---------------------

The data at the root level is invalid. Line 1, position 1.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details: System.Xml.XmlException: The data at
the root level is invalid. Line 1, position 1.

Source Error:

An unhandled exception was generated during the execution
of the current web request. Information regarding the
origin and location of the exception can be identified
using the exception stack trace below.

Stack Trace:


[XmlException: The data at the root level is invalid. Line
1, position 1.]
System.Xml.XmlTextReader.ParseRoot() +295
System.Xml.XmlTextReader.Read() +127
Microsoft.Web.UI.WebControls.TreeView.ReadXmlSrc(String
TreeNodeSrc, String TreeNodeXsltSrc, String strOuter) +127
Microsoft.Web.UI.WebControls.TreeView.ReadTreeNodeXmlSrc
() +70
Microsoft.Web.UI.WebControls.TreeView.OnInit(EventArgs
e) +90
System.Web.UI.Control.InitRecursive(Control
namingContainer) +240
System.Web.UI.Control.InitRecursive(Control
namingContainer) +178
System.Web.UI.Control.InitRecursive(Control
namingContainer) +178
System.Web.UI.Page.ProcessRequestMain() +174
 
R

Rajesh.V

Ie web controls is compiled in ver 1.0, and so u will have to try it out.
Its a risk.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top