\u63a5\u7740\uff0c\u4e3a XML \u6587\u4ef6\u521b\u5efa\u4e00\u4e2a DataSet\uff0c\u5e76\u5728\u9875\u9762\u7b2c\u4e00\u6b21\u52a0\u8f7d\u65f6\u628a\u8fd9\u4e2a XML \u6587\u4ef6\u8f7d\u5165 DataSet\uff1a<\/p>\n
\r\n<script runat=\"server\">\r\nsub Page_Load\r\nif Not Page.IsPostBack then \r\ndim mycountries=New DataSet \r\nmycountries.ReadXml(MapPath(\"countries.xml\"))\r\nend if\r\nend sub<\/pre>\n\u4e3a\u4e86\u7ed1\u5b9a\u6570\u636e\u5230 RadioButtonList \u63a7\u4ef6\uff0c\u9996\u5148\u8981\u5728 .aspx \u9875\u9762\u4e2d\u521b\u5efa\u4e00\u4e2a RadioButtonList \u63a7\u4ef6\uff08\u4e0d\u5e26\u4efb\u4f55 asp:ListItem \u5143\u7d20\uff09\uff1a<\/p>\n
\r\n<html>\r\n<body>\r\n<form runat=\"server\">\r\n<asp:RadioButtonList id=\"rb\" runat=\"server\"\r\nAutoPostBack=\"True\" \/>\r\n<\/form>\r\n<\/body>\r\n<\/html><\/pre>\n\u7136\u540e\u6dfb\u52a0\u521b\u5efa XML DataSet \u7684\u811a\u672c\uff0c\u5e76\u4e14\u7ed1\u5b9a XML DataSet \u4e2d\u7684\u503c\u5230 RadioButtonList \u63a7\u4ef6\uff1a<\/p>\n
\r\n<%@ Import Namespace=\"System.Data\" %>\r\n<script runat=\"server\">\r\nsub Page_Load\r\nif Not Page.IsPostBack then \r\ndim mycountries=New DataSet \r\nmycountries.ReadXml(MapPath(\"countries.xml\")) \r\nrb.DataSource=mycountries \r\nrb.DataValueField=\"value\" \r\nrb.DataTextField=\"text\" \r\nrb.DataBind()\r\nend if\r\nend sub\r\n<\/script>\r\n<html>\r\n<body>\r\n<form runat=\"server\">\r\n<asp:RadioButtonList id=\"rb\" runat=\"server\"\r\nAutoPostBack=\"True\" onSelectedIndexChanged=\"displayMessage\" \/>\r\n<\/form>\r\n<\/body>\r\n<\/html><\/pre>\n\u7136\u540e\u6211\u4eec\u6dfb\u52a0\u4e00\u4e2a\u5b50\u4f8b\u7a0b\uff0c\u5f53\u7528\u6237\u70b9\u51fb RadioButtonList \u63a7\u4ef6\u4e2d\u7684\u67d0\u4e2a\u9879\u76ee\u65f6\uff0c\u8be5\u5b50\u4f8b\u7a0b\u4f1a\u88ab\u6267\u884c\u3002\u5f53\u67d0\u4e2a\u5355\u9009\u6309\u94ae\u88ab\u70b9\u51fb\u65f6\uff0clabel \u4e2d\u4f1a\u51fa\u73b0\u4e00\u884c\u6587\u672c\uff1a<\/p>\n
\u5b9e\u4f8b<\/p>\n
\r\n<%@ Import Namespace=\"System.Data\" %>\r\n<script runat=\"server\">\r\nsub Page_Load\r\nif Not Page.IsPostBack then\r\ndim mycountries=New DataSet\r\nmycountries.ReadXml(MapPath(\"countries.xml\"))\r\nrb.DataSource=mycountries\r\nrb.DataValueField=\"value\"\r\nrb.DataTextField=\"text\"\r\nrb.DataBind()\r\nend if\r\nend sub\r\nsub displayMessage(s as Object,e As EventArgs)\r\nlbl1.text=\"Your favorite country is: \" & rb.SelectedItem.Text\r\nend sub\r\n<\/script>\r\n<html>\r\n<body>\r\n<form runat=\"server\">\r\n<asp:RadioButtonList id=\"rb\" runat=\"server\"\r\nAutoPostBack=\"True\" onSelectedIndexChanged=\"displayMessage\" \/>\r\n<p><asp:label id=\"lbl1\" runat=\"server\" \/><\/p>\r\n<\/form>\r\n<\/body>\r\n<\/html>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"\u8fd9\u91cc\u6709\u4e00\u4e2a\u540d\u4e3a “countries.xml” \u7684 XML \u6587\u4ef6\uff1a <?xml version=”1.0 […]<\/p>\n","protected":false},"author":1470,"featured_media":243260,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-243258","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/243258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1470"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=243258"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/243258\/revisions"}],"predecessor-version":[{"id":243263,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/243258\/revisions\/243263"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/243260"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=243258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=243258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=243258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}