📄 cascadingdropdown.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CascadingDropDown.aspx.cs" Inherits="_Default" EnableEventValidation="false" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!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">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<table>
<tr>
<td style="height: 22px">省份
</td>
<td style="height: 22px">
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList></td>
</tr>
<tr>
<td>
城市</td>
<td>
<asp:DropDownList ID="DropDownList2" runat="server">
</asp:DropDownList></td>
</tr>
<tr>
<td>
县</td>
<td>
<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True">
</asp:DropDownList></td>
</tr>
</table>
<cc1:CascadingDropDown ID="CascadingDropDown1" runat="server" Category="province"
LoadingText="加载中..." PromptText="请选择" ServiceMethod="GetDropDownContents" TargetControlID="DropDownList1" ServicePath="WebService.asmx">
</cc1:CascadingDropDown>
<cc1:CascadingDropDown ID="CascadingDropDown2" runat="server" Category="city" LoadingText="加载中..."
ParentControlID="DropDownList1" PromptText="请选择" ServiceMethod="GetDropDownContents"
ServicePath="WebService.asmx" TargetControlID="DropDownList2">
</cc1:CascadingDropDown>
<cc1:CascadingDropDown ID="CascadingDropDown3" runat="server" Category="country"
LoadingText="加载中..." ParentControlID="DropDownList2" PromptText="请选择" ServiceMethod="GetDropDownContents" ServicePath="WebService.asmx"
TargetControlID="DropDownList3">
</cc1:CascadingDropDown>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -