Solved

asp.net xmldatasource

Posted on 2015-02-16
2
102 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
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 500 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

Independent Software Vendors: 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

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 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