当前位置: 代码迷 >> C# >> 求帮忙看看,如何一直报错
  详细解决方案

求帮忙看看,如何一直报错

热度:174   发布时间:2016-05-05 05:23:25.0
求帮忙看看,怎么一直报错
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="cityTest.aspx.cs" Inherits="DTcms.Web.admin.city.cityTest" %>

<!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>
    <script type="text/javascript" src="../../scripts/jquery/jquery-1.10.2.min.js"></script>
    
    <script type="text/javascript">
        function GetCityInfo(proId, level) {
            $.ajax({
                type: "GET",
                url: "../../tools/city_ajax.ashx?type=GetCityInfo" + "&proId=" + proId + "&level=" + level,
                data: "",
                beforeSend: function () { },
                success: function (msg) {
                    switch (level) {
                        case 1:
                            $("#spCity").html(msg);
                            break;
                        default:
                            break;
                    }

                },
                error: function () { alert("有问题,改改试试"); },
                complete: function () { }
            });
        }
        function ChangeSelect(proId, name) {
            switch (name) {
                case "<%=ddlProvince.ClientID%>":
                    GetCityInfo(proId, 1);
                    break;
                default:
                    break;
            }
        }
    </script>
</head>
<body> 
    <form id="form1" runat="server">
    <div>
        <span id="spProvince">
            <asp:DropDownList ID="ddlProvince" runat="server" onchange="ChangeSelect(this.options[this.selectedIndex].value,this.name)" >
            </asp:DropDownList>
        </span>
        <span id="spCity">
           
        </span>
    </div>
    </form>
</body>
</html>

------解决思路----------------------
你在后台设断点来调试,查一下数据读取,看在哪一步出错
  相关解决方案