我要写个 4个 DropDownList 连动实现 省份-城市-区县-街道,我把这个做成用户控件,并为用户控件设置4个属性以在调用页中取得省份-城市-区县-街道的值,还想在用户控件里用AjaxPanel来实现局部刷新,但是调用时 IE 状态栏有提示 脚本错误。而且无法在调用页上取得 用户控件 的4个属性。请问改怎么解决?
----------------------- ascx 代码-----------------------------
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CityList.ascx.cs" Inherits="CityList" %>
<ajax:AjaxPanel ID="AjaxPanelCityList" runat="server">
    <table border="0" cellpadding="1" cellspacing="1">
        <tr>
            <td style="width: 95px;">
                <asp:DropDownList ID="DDLProvinces" runat="server" OnSelectedIndexChanged="DDLProvinces_SelectedIndexChanged"
                    AutoPostBack="true">
                </asp:DropDownList></td>
            <td style="width: 95px;">
                <asp:DropDownList ID="DDLCities" runat="server" Visible="False" OnSelectedIndexChanged="DDLCities_SelectedIndexChanged"
                    AutoPostBack="true">
                </asp:DropDownList></td>
            <td style="width: 95px;">
                <asp:DropDownList ID="DDLCounties" runat="server" Visible="False" OnSelectedIndexChanged="DDLCounties_SelectedIndexChanged"
                    AutoPostBack="true">
                </asp:DropDownList></td>
            <td style="width: 95px;">
                <asp:DropDownList ID="DDLStreets" runat="server" Visible="False" OnSelectedIndexChanged="DDLStreets_SelectedIndexChanged">
                </asp:DropDownList></td>
        </tr>
    </table>
</ajax:AjaxPanel>------------------------ ascx.cs 代码 --------------------
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using UNGou.BLL;public partial class CityList : System.Web.UI.UserControl
{
    
    private int _Province;
    /// <summary>
    /// 省份
    /// </summary>
    public int Province
    {
        get { return _Province; }
        set { _Province = value; }
    }    private int _City;
    /// <summary>
    /// 城市
    /// </summary>
    public int City
    {
        get { return _City; }
        set { _City = value; }
    }    private int _County;
    /// <summary>
    /// 
    /// </summary>
    public int County
    {
        get { return _County; }
        set { _County = value; }
    }    private int _Street;
    /// <summary>
    /// 镇/街道
    /// </summary>
    public int Street
    {
        get { return _Street; }
        set { _Street = value; }
    }
    
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!Page.IsPostBack)
            this.ProvincesBind();
    }    //绑定省份
    void ProvincesBind()
    {
        DDLProvinces.DataSource = CityInfoBLL.GetALLSF().Tables["Temp"];
        DDLProvinces.DataTextField = "CityName";
        DDLProvinces.DataValueField = "PKID";
        DDLProvinces.DataBind();
        DDLProvinces.Items.Insert(0, new ListItem("请选择省份", "0"));
    }    //绑定城市
    void CitiesBind(int oneId)
    {
        DDLCities.DataSource = CityInfoBLL.GetChenShi(oneId);
        DDLCities.DataTextField = "CityName";
        DDLCities.DataValueField = "PKID";
        DDLCities.DataBind();
        DDLCities.Items.Insert(0, new ListItem("请选择城市", "0"));
    }    //绑定县/区
    void CountiesBind(int twoId)
    {
        DDLCounties.DataSource = CityInfoBLL.GetXian(twoId);
        DDLCounties.DataTextField = "CityName";
        DDLCounties.DataValueField = "PKID";
        DDLCounties.DataBind();
        DDLCounties.Items.Insert(0, new ListItem("请选择县/区", "0"));
    }    //绑定镇/街道
    void StreetBind(int threeId)
    {
        DDLStreets.DataSource = CityInfoBLL.GetZhen(threeId);
        DDLStreets.DataTextField = "CityName";
        DDLStreets.DataValueField = "PKID";
        DDLStreets.DataBind();
        DDLStreets.Items.Insert(0, new ListItem("请选择镇/街道", "0"));
    }    //选择省份后触发
    protected void DDLProvinces_SelectedIndexChanged(object sender, EventArgs e)
    {
        this.Province = Int32.Parse(DDLProvinces.SelectedValue);
       
        this.DDLCities.Visible = true;
        this.DDLCounties.Visible = false;
        this.DDLStreets.Visible = false;
        this.CitiesBind(Int32.Parse(DDLProvinces.SelectedValue));
        this.DDLCities.Focus();
    }    //选择城市后触发
    protected void DDLCities_SelectedIndexChanged(object sender, EventArgs e)
    {
        this.City = Int32.Parse(DDLCities.SelectedValue);
        MagicAjax.AjaxCallHelper.WriteAlert(DDLCities.SelectedItem.Text+this.City.ToString());
        this.DDLCounties.Visible = true;
        this.DDLStreets.Visible = false;
        this.CountiesBind(Int32.Parse(DDLCities.SelectedValue));
        this.DDLCounties.Focus();
    }    //选择区县后触发
    protected void DDLCounties_SelectedIndexChanged(object sender, EventArgs e)
    {
       
        this.County = Int32.Parse(DDLCounties.SelectedValue);
        this.DDLStreets.Visible = true;
        this.StreetBind(Int32.Parse(DDLCounties.SelectedValue));
        this.DDLStreets.Focus();
    }
    
    protected void DDLStreets_SelectedIndexChanged(object sender, EventArgs e)
    {
        this.Street = Int32.Parse(DDLStreets.SelectedValue);
    }
    
   
}-----------------------------------