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

x
?
Solved

asp.net xmldatasource

Posted on 2015-02-16
2
Medium Priority
?
108 Views
Last Modified: 2015-02-16
Can you show me how to call BondAmount in asp.net/c# ?
I basically want to get the list of bond amount so i will be

10000
15000

How can I do that using gridview and xmldatasource?

Thanks

<Bonds>
<Bond>
    <State>CA</State>
    <BondAmountListing>
      <BondAmount>10000</BondAmount>
      <BondAmount>15000</BondAmount>
     
    </BondAmountListing>
 /Bond>
</Bonds>
0
Comment
Question by:ITsolutionWizard
[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 64

Expert Comment

by:Fernando Soto
ID: 40612448
Hi  ITsolutionWizard;

You have posted this exact same question three times with no real results. In your last question I hopefully  gave some direction on what to post the title of the question to get the right experts involved.  I can only assume you will most likely not get the right people to look inside to help with this question. Good Luck.
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 2000 total points
ID: 40612452
Try something like:
    <asp:XmlDataSource ID="XmlDS1" runat="server" DataFile="C:\temp\test.xml" XPath="/Bonds/Bond/BondAmountListing/BondAmount" />

    <asp:GridView ID="GridView1" runat="server" DataSourceID="XmlDS1" AutoGenerateColumns="false">
        <Columns>
            <asp:TemplateField HeaderText="Wibble">
                <ItemTemplate>
                    <%#XPath(".") %>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>

Open in new window

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
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…

618 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