Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ASP Master Pages TreeView XML Display in Contentplaceholder?

Posted on 2008-10-08
2
Medium Priority
?
453 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 1500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

609 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