?
Solved

asp.net xmldatasource

Posted on 2015-02-16
2
Medium Priority
?
106 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 63

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

Industry Leaders: 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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

741 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