<%@ Page language="c#" %>
<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Xml" %>
<script language="c#" runat="server">
void Page_Load()
{
// string xmlFilename = @"C:\artists.xml";
string xmlFilename = MapPath("AdRotatorBasic.xml");
DataSet newDataSet = new DataSet();
newDataSet.ReadXml(xmlFilename);
DataGrid1.DataSource = newDataSet;
DataGrid1.DataBind();
}
</script>
<html>
<head>
<title>Data Grid Control example</title>
</head>
<body>
<asp:DataGrid id="DataGrid1" runat="server" />
</body>
</html>
|