综合

img china2001ok

XML with asp.net(1)

发表于2004/10/21 13:57:00  673人阅读

first step:
build a XML.xml
<Menu>
<MenuItem>
<Food>
French Toast
</Food>
<Price>
11.21
</Price>
</MenuItem>
<MenuItem>
<Food>
tomato
</Food>
<Price>
10
</Price>
</MenuItem>
</Menu>

NEXT STEP
use dataset to get xml (doxml.aspx)

private void Page_Load(object sender, System.EventArgs e)
  {
   // 在此处放置用户代码以初始化页面
   DataSet ds=new DataSet ();
   ds.ReadXml (MapPath("XML.xml"));
   DataGrid1.DataSource =ds;
   DataGrid1.DataBind ();
  }
阅读全文
0 0

相关文章推荐

img
取 消
img