<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:DropDownList ID="ddlProvince" runat="server" 
            AutoPostBack="True" DataSourceID="XmlDataSource1" DataTextField="pname" 
            DataValueField="pname" 
            onselectedindexchanged="ddlProvince_SelectedIndexChanged" 
            AppendDataBoundItems="True">
            <asp:ListItem Selected="True">省份</asp:ListItem>
        </asp:DropDownList>
        <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/XMLFile.xml" 
            XPath="//Province"></asp:XmlDataSource>
        <asp:DropDownList ID="ddlCity" runat="server" 
            AutoPostBack="True" DataSourceID="XmlDataSource2" DataTextField="cname" 
            DataValueField="cname" 
            onselectedindexchanged="ddlCity_SelectedIndexChanged" 
            AppendDataBoundItems="True">
            <asp:ListItem Selected="True">区市</asp:ListItem>
        </asp:DropDownList>
        <asp:XmlDataSource ID="XmlDataSource2" runat="server" DataFile="~/XMLFile.xml" 
            XPath="//Province[@pname='']/City"></asp:XmlDataSource>
        <asp:DropDownList ID="ddlCounty" runat="server" 
            DataSourceID="XmlDataSource3" DataTextField="name" DataValueField="name" 
            AppendDataBoundItems="True" AutoPostBack="True">
            <asp:ListItem Selected="True">县市</asp:ListItem>
        </asp:DropDownList>
        <asp:XmlDataSource ID="XmlDataSource3" runat="server" DataFile="~/XMLFile.xml" 
            XPath="//Province[@pname='']/City[@cname='']/County"></asp:XmlDataSource>
    
    </div>
    </form>
</body>
</html>
