Solved

ASP Master Pages TreeView XML Display in Contentplaceholder?

Posted on 2008-10-08
2
445 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

729 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