Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Having a difficulty working with the Treeview Web Control

Reply
Thread Tools

Re: Having a difficulty working with the Treeview Web Control

 
 
Bjoern Wolfgardt
Guest
Posts: n/a
 
      07-16-2003
Hi,

I have answered your question in:
microsoft.public.dotnet.framework.aspnet.webcontro ls

Pls don't do crossposting. Some won't answer your request if you do
crossposting.

cu
Bjoern Wolfgardt


"Howard, Brett" <(E-Mail Removed)> schrieb im
Newsbeitrag news:(E-Mail Removed)...
> I am having a problem with using the Treeview Web Control. When I try to

set
> a tree source node to an XML file, I get the following 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)
> Microsoft.Web.UI.WebControls.TreeNode.ReadXmlSrc()
> Microsoft.Web.UI.WebControls.TreeNode.Databind()
> Microsoft.Web.UI.WebControls.TreeNode.OnInit()
> Microsoft.Web.UI.WebControls.TreeView.OnInit(Event Args e)
> System.Web.UI.Control.InitRecursive(Control namingContainer)
> System.Web.UI.Control.InitRecursive(Control namingContainer)
> System.Web.UI.Control.InitRecursive(Control namingContainer)
> System.Web.UI.Page.ProcessRequestMain()
>
> This is my source code.
> TreeViewDemo.aspx
> <%@ register TagPrefix="myTree" Namespace="Microsoft.Web.UI.WebControls"
> Assembly="Microsoft.Web.UI.WebControls" %>
> <%@ Page Language="vb" AutoEventWireup="false"
> Codebehind="TreeViewDemo.aspx.vb" Inherits="treeviewdemo.TreeViewDemo"%>
> <!DOCTYPE html public "-//w3c//dtd html 4.0 transitional//en">
> <HTML>
> <HEAD>
> <TITLE>TreeViewDemo2</TITLE>
> <META name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
> <META name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
> <META name=vs_defaultClientScript content="JavaScript">
> <META name=vs_targetSchema
> content="http://schemas.microsoft.com/intellisense/ie5">
> </HEAD>
> <BODY>
> <FORM id="Form1" method="post" runat="server">
> <DIV style="FONT-WEIGHT:bold">Static TreeView</DIV>
> <MYTREE:TREEVIEW id="trvStatic" RUNAT="server" CHILDTYPE="Categories">
> <MYTREE:TREENODETYPE TYPE="Categories" CHILDTYPE="Authors"/>
> <MYTREE:TREENODETYPE TYPE="Authors" CHILDTYPE="Books"/>
> <MYTREE:TREENODETYPE TYPE="Books" IMAGEURL="images/html.gif"/>
> </MYTREE:TREEVIEW>
> <DIV style="FONT-WEIGHT:bold">XML TreeView</DIV>
> <MYTREE:TREEVIEW runat="server">
> <MYTREE:TREENODE runat="server" text="Employees" expanded="True"
> treenodesrc="TreeViewData.xml"/>
> </MYTREE:TREEVIEW>
>
> </FORM>
> </BODY>
> </HTML>
>
> TreeViewData.xml
> <?xml version="1.0" encoding="utf-8" ?>
> <TREENODES>
> <treenode text="Web Development">
> <treenode text="Brett Howard" />
> <treenode text="Kevin Buchan" />
> <treenode text="Patrick Ledbetter" />
> </treenode>
> <treenode text="Significant others">
> <treenode text="Marrette" />
> <treenode text="Tiffany" />
> <treenode text="N/A" />
> </treenode>
> </TREENODES>
>
> From the documentation that I have read, this should work. If someone can
> help me, I will be forever grateful.
>
> Brett Howard
>
>



 
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
having difficulty calling my functions (directly not threw events) Andrew Falanga Javascript 5 11-22-2008 06:49 PM
Difficulty disabling the read-only attribute on an ASP.net working =?Utf-8?B?SmVmZkRvdE5ldA==?= ASP .Net 7 03-28-2007 02:31 AM
Issue with a custom TreeView derived from the TreeView control Ionutz ASP .Net Web Controls 2 10-23-2005 03:23 PM
TreevIew having hyperlinks in the submenu naija naija ASP .Net Web Controls 0 09-08-2004 03:25 AM
Difficulty in changing the Connection Server control path changing ... Samridhi Kumar Shukla ASP .Net 1 11-30-2003 02:31 AM



Advertisments