zoukankan      html  css  js  c++  java
  • ASP .NET XML 文件

    这里有一个名为 "countries.xml" 的 XML 文件:

    Code

    请查看该文件:countries.xml

    把 DataSet 绑定到 List 控件

    首先,导入 "System.Data" 命名空间。我们需要该命名空间与 DataSet 对象一起工作。把下面这条指令包含在 .aspx 页面的顶部:

    <%@ Import Namespace="System.Data" %>

    接下来,为这个 XML 文件创建一个 DataSet,并在页面首先加载时把这个 XML 文件载入该 DataSet:

    Code

    如需把该 DataSet 绑定到 RadioButtonList 控件,首先请在 .aspx 页面中创建一个 RadioButtonList 控件(没有任何 asp:ListItem 元素):

    Code

    然后添加构建这个 XML DataSet 的脚本:

    Code

    然后,我们添加一个子例程,该子例程会在用户点击 RadioButtonList 控件中的项目时执行。当用户点击某个单选按钮时,label 中会出现一条文本:

    Code
  • 相关阅读:
    [LeetCode] 304. Range Sum Query 2D
    [LeetCode] 303. Range Sum Query
    [Google] Help employee find the nearest gbike
    Difference between Process and thread?
    Given a family tree, find out if two people are blood related
    [LeetCode] 676. Implement Magic Dictionary 实现神奇字典
    [LeetCode] 659. Split Array into Consecutive Subsequences 将数组分割成连续子序列
    [LeetCode] 815. Bus Routes 公交路线
    [LeetCode] 129. Sum Root to Leaf Numbers 求根到叶节点数字之和
    mybatis example 使用AND 和OR 联合查询
  • 原文地址:https://www.cnblogs.com/shineqiujuan/p/1301427.html
Copyright © 2011-2022 走看看