iNET Interactive - Online Advertising Agency
          
   Home    Authors    About    Login    Contact Us
   Search:   
Advanced Search     
  Articles

  ASP (26)
  ASP.NET (19)
  C and C++ (4)
  CFML (2)
  CGI and Perl (16)
  Flash (2)
  Java (7)
  JavaScript (28)
  PHP (92)
  MySQL (13)
  MSSQL (3)
  HTML (34)
  SEO (9)
  Visual Basic (12)
  CSS (13)
  SSI (5)
  XML (12)
  C# (14)

  Developer News

May 8, 2008
Meet The Hardy Heron: What's New in Ubuntu 8.04
OReilly Network
 
May 8, 2008
Does Enterprise Development Have to Be Painful? (Part Two)
OReilly Network
 
May 8, 2008
Perl Pragma Primer
WebReference.com
 
May 8, 2008
1 comment
.net
 
May 7, 2008
Poll: Do you check the download speed of the pages you build?
About
 
May 6, 2008
Web Design Firms - 18 New Listings
About
 
Courtesy of moreover.com
 
Want to receive new articles via e-mail? Click here!
/Home /XML

Fill A DataGrid From An XML File 

  Views:    12798
  Votes:    4
by ORCS WEB, Inc. 2/05/05 Rating: 

Synopsis:

The code below demonstrates how to populate an ASP.Net DataGrid control with the contents of an XML file.
Pages: 
The Article

    <%Page Language="VB" Trace="false"%>
    <%@Import Namespace="System.Data"%>
    <script language="VB" runat="server">
    Sub Page_Load(Src as Object, E as EventArgs)
    Dim oDataSet As DataSet = New DataSet
   
    oDataSet.ReadXml("C:\GridTest\authors.xml",XmlReadMode.ReadSchema)
   
    oGrid.DataSource=oDataSet
    oGrid.DataBind()
    End Sub
    </script>
    <html>
    <head>
    <title>Fill A DataGrid From An XML File</title>
    </head>
    <body>
    <asp:DataGrid id="oGrid" runat="server"
    </body>
    </html>
    <p/>
    </html>


~Brad


Brad Kingsley is founder and president of ORCS Web, Inc. - a company that provides managed hosting services for clients who develop and deploy their applications on Microsoft Windows platforms.

Pages: 



 
  Sponsors