Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Does treeview works in .NET framework 1.1 using TreeNodeSrc to bind an XML file.

Reply
Thread Tools

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

 
 
Thomas
Guest
Posts: n/a
 
      10-16-2003
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(S tring
TreeNodeSrc, String TreeNodeXsltSrc, String strOuter) +127
Microsoft.Web.UI.WebControls.TreeView.ReadTreeNode XmlSrc
() +70
Microsoft.Web.UI.WebControls.TreeView.OnInit(Event Args
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




-----------------------------------------------------------
---------------------
Version Information: Microsoft .NET Framework
Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
 
Reply With Quote
 
 
 
 
Rajesh.V
Guest
Posts: n/a
 
      10-16-2003
Ie web controls is compiled in ver 1.0, and so u will have to try it out.
Its a risk.

"Thomas" <(E-Mail Removed)> wrote in message
news:0abd01c393bb$51f453c0$(E-Mail Removed)...
> 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(S tring
> TreeNodeSrc, String TreeNodeXsltSrc, String strOuter) +127
> Microsoft.Web.UI.WebControls.TreeView.ReadTreeNode XmlSrc
> () +70
> Microsoft.Web.UI.WebControls.TreeView.OnInit(Event Args
> 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
>
>
>
>
> -----------------------------------------------------------
> ---------------------
> Version Information: Microsoft .NET Framework
> Version:1.1.4322.573; ASP.NET Version:1.1.4322.573



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Treeview.TreeNodeSrc = "xml formated string" does url-request ThoGen ASP .Net Web Controls 0 04-21-2006 09:14 AM
Using string as datasource of TreeNodeSrc on TreeView claireCSHARPuser@hotmail.co.uk ASP .Net 0 06-30-2005 01:02 PM
TreeView Control - Basic Question with TreeNodeSrc Dennis Redfield ASP .Net Web Controls 8 02-25-2005 01:11 AM
How to bind an xml string to TreeNodeSrc Donal ASP .Net Web Controls 0 03-06-2004 07:39 PM
Set TreeNodeSrc to an XML file dynamically ??? ASP .Net Web Controls 1 09-29-2003 05:51 AM



Advertisments