求一个程序?(c# + SqlServer)

来源:百度知道 编辑:UC知道 时间:2024/05/22 15:37:40
省与城市之间的联系。两个下拉框。选择某个省,另外的一个下拉框自动的显现出那个省的城市。

<%@ Page Language="C#" %>

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

<script runat="server">

protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
cDataSource.XPath = string.Format("/citys/city[@pid='{0}']", province.SelectedValue);
city.DataBind();
}
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
</head>
<body>
<asp:XmlDataSourc