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

Discussion in 'ASP .Net Web Controls' started by Thomas, Oct 16, 2003.

  1. Thomas

    Thomas Guest

    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




    -----------------------------------------------------------
    ---------------------
    Version Information: Microsoft .NET Framework
    Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
     
    Thomas, Oct 16, 2003
    #1
    1. Advertising

  2. Thomas

    Rajesh.V Guest

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

    "Thomas" <> wrote in message
    news:0abd01c393bb$51f453c0$...
    > 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
    >
    >
    >
    >
    > -----------------------------------------------------------
    > ---------------------
    > Version Information: Microsoft .NET Framework
    > Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
     
    Rajesh.V, Oct 16, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    2,090
  2. Guest

    Set TreeNodeSrc to an XML file dynamically ???

    Guest, Sep 29, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    182
    Tian Min Huang
    Sep 29, 2003
  3. Donal

    How to bind an xml string to TreeNodeSrc

    Donal, Mar 6, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    131
    Donal
    Mar 6, 2004
  4. Dennis Redfield

    TreeView Control - Basic Question with TreeNodeSrc

    Dennis Redfield, Feb 17, 2005, in forum: ASP .Net Web Controls
    Replies:
    8
    Views:
    173
    Steven Cheng[MSFT]
    Feb 25, 2005
  5. ThoGen
    Replies:
    0
    Views:
    130
    ThoGen
    Apr 21, 2006
Loading...

Share This Page