级联下拉列表不会在页面加载事件中加载?

时间:2015-10-07 10:22:20

标签: c# asp.net

我有一个用户控件,我使用级联下拉状态,区域和区域...如何在用户控制页面加载中加载级联下拉列表....级联下拉代码是



<table>
<tr>
    <td class="caption">
        State:
        <asp:DropDownList ID="ddlCState" runat="server" CssClass="userentry">
        </asp:DropDownList>
        <cc1:CascadingDropDown ID="cdlCStates" TargetControlID="ddlCState" PromptText="Select State"
            ServicePath="~/CasCadingDropDown.asmx" ServiceMethod="GetStates"  runat="server"
            Category="StateId" LoadingText="Loading..." />
    </td>
</tr>
<tr>
    <td class="caption">
        District:
        <asp:DropDownList ID="ddlCDistrict" runat="server" CssClass="userentry">
        </asp:DropDownList>
        <cc1:CascadingDropDown ID="cdlCDistrict" TargetControlID="ddlCDistrict" PromptText="Select District"
            ServicePath="~/CasCadingDropDown.asmx" ServiceMethod="GetDistricts"  runat="server"
            Category="DistrictId" ParentControlID="ddlCState" LoadingText="Loading..." />
    </td>
</tr>
<tr>
    <td class="caption">
        Area:
        <asp:DropDownList ID="ddlCArea" runat="server" CssClass="userentry">
        </asp:DropDownList>
        <cc1:CascadingDropDown ID="cdlCAreas" TargetControlID="ddlCArea" PromptText="Select Area"
            ServicePath="~/CasCadingDropDown.asmx" ServiceMethod="GetAreas"  runat="server"
            Category="AreaId" ParentControlID="ddlCDistrict" LoadingText="Loading..." />
    </td>
</tr></table>
&#13;
&#13;
&#13;

0 个答案:

没有答案