Solved

ASP Master Pages TreeView XML Display in Contentplaceholder?

Posted on 2008-10-08
2
428 Views
Last Modified: 2012-05-05
I'm using the following 'Bookstore' XML file with ASP Master Pages.
I have a TreeView in the Left div and a contentplaceholder in the right div.
So far the TreeView reads the XML file very well.

Q. How do I display the XML Book, Chapter, Abstract in the contentplaceholder?

<?xml version="1.0" encoding="utf-8" ?>
<Bookstore>
  <genre name="Business">
    <book ISBN="BU1032" Title="The Busy Executive's Database Guide" Price="19.99">
      <chapter num="1" name="Introduction">
        Abstract...
      </chapter>
      <chapter num="2" name="Body">
        Abstract...
      </chapter>
      <chapter num="3" name="Conclusion">
        Abstract...
      </chapter>
    </book>
    <book ISBN="BU2075" Title="You Can Combat Computer Stress!" Price="2.99">
      <chapter num="1" name="Introduction">
        Abstract...
      </chapter>
      <chapter num="2" name="Body">
        Abstract...
      </chapter>
      <chapter num="3" name="Conclusion">
        Abstract...
      </chapter>
    </book>
    <book ISBN="BU7832" Title="Straight Talk About Computers" Price="19.99">
      <chapter num="1" name="Introduction">
        Abstract...
      </chapter>
      <chapter num="2" name="Body">
        Abstract...
      </chapter>
      <chapter num="3" name="Conclusion">
        Abstract...
      </chapter>
    </book>
  </genre>
</Bookstore>
0
Comment
Question by:pointeman
2 Comments
 
LVL 18

Accepted Solution

by:
David Robitaille earned 500 total points
ID: 22668857
Well, the content placeholder is where your web page (the page that is using the masterpage) will be display.
is you are trying to display something in the master page, dont put it in the content placeholder.
if you are tying to access the masterpage s content from the web page, here a link:
http://www.asp.net/learn/master-pages/tutorial-06-vb.aspx
0
 

Author Comment

by:pointeman
ID: 22670279
Typo, I do have a default.aspx page opening in the contextplaceholder.
Added the following to the TreeView, displays XML better:

<DataBindings>
<asp:TreeNodeBinding DataMember="book" ValueField="ISBN" TextField="Title" NavigateUrl="~/Default.aspx"/>
<asp:TreeNodeBinding DataMember="chapter" ValueField="num" TextField="name"/>
</DataBindings>
</asp:TreeView>
 None-the-less, still need to open another XML file in the default.aspx via a TreeView click. Here's the new XML:

<Bookstore>
<genre name="Business">
<book ISBN="BU1032" Title="The Busy Executive's Database Guide" Price="19.99" Dir="another.xml">
<chapter num="1" name="Introduction">
Abstract...
</chapter>
<chapter num="2" name="Body">
Abstract...
</chapter>
<chapter num="3" name="Conclusion">
Abstract...
</chapter>
</book>
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
HTML table 7 54
Add json string to a javascript object 9 47
VBSCRIPT in Page Load C# ASP.NET 6 53
Azure Web App - See files 3 21
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now