Articles |
 |
Developer News |
 |
|
|
| Want to receive new articles via e-mail? Click here! |
/Home
/XML
 |
Fill A DataGrid From An XML File  |
|
|
|
|
Synopsis:
The code below demonstrates how to populate an ASP.Net DataGrid control with the contents of an XML file. |
|
|
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.
|
|
|
|
|
|
Sponsors |
 |
|
|
|