教程集 www.jiaochengji.com
教程集 >  脚本编程  >  Asp.net  >  正文 ASP .NET 处理 XML 文件教程

ASP .NET 处理 XML 文件教程

发布时间:2018-10-01   编辑:jiaochengji.com
教程集为您提供ASP .NET 处理 XML 文件教程等资源,欢迎您收藏本站,我们将为您提供最新的ASP .NET 处理 XML 文件教程资源

我们可以结合一个XML文件到清单控制

范例
例如1 -X ML的R adiobuttonList

一个XML文件
这是一个XML文件名为“ countries.xml ” :

<?xml version="1.0" encoding="ISO-8859-1"?>
<countries>
<country>
<text>Norway</text>
<value>N</value>
</country>
<country>
<text>Sweden</text>
<value>S</value>
</country>
<country>
<text>France</text>
<value>F</value>
</country>
<country>
<text>Italy</text>
<value>I</value>
</country>
</countries>
看看XML文件: countries.xml -------------------------------------------------- ------------------------------ 一个DataSet绑定到控制列表首先,进口的“ System.Data ”命名空间。我们需要这种命名与DataSet对象。包括下列指令上方的一个。 aspx页:<%@ Import Namespace="System.Data" %>下一步,创建一个DataSet的XML文件,并加载XML文件到DataSet网页时首先加载:<script runat="server">
sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New DataSet
  mycountries.ReadXml(MapPath("countries.xml"))
end if
end sub绑定数据到RadioButtonList控件,首先创建一个RadioButtonList控件(无任何ASP : ListItem元素)的。aspx页:html>
<body><form runat="server">
<asp:RadioButtonList id="rb" runat="server"
AutoPostBack="True" /></form></body>
</html>Then add the script

您可能感兴趣的文章:
ASP .NET 处理 XML 文件教程
ASP 全新接触(1)
jQuery表格插件 jQuery grid view plugin
突破性的ASP 技术
asp文件怎么转换成php文件
ASP request.from 教程
用JQuery 实现AJAX加载XML并解析的脚本
C#.NET数据库操作记要
基于.Net Framework的N层分布式应用开发
c# 解析XML文件的方法总结

[关闭]
~ ~