📄 default.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" EnableEventValidation="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<table>
<tr>
<td>Make</td>
<td><asp:DropDownList ID="DropDownList1" runat="server" Width="170" /></td>
</tr>
<tr>
<td>Model</td>
<td><asp:DropDownList ID="DropDownList2" runat="server" Width="170" /></td>
</tr>
<tr>
<td>Color</td>
<td><asp:DropDownList ID="DropDownList3" runat="server" Width="170" AutoPostBack="true"
OnSelectedIndexChanged="DropDownList3_SelectedIndexChanged" /></td>
</tr>
</table>
<br />
<ajaxToolkit:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="DropDownList1"
Category="Make" PromptText="Please select a make" LoadingText="[Loading makes...]"
ServicePath="CarsService.asmx" ServiceMethod="GetDropDownContents" />
<ajaxToolkit:CascadingDropDown ID="CascadingDropDown2" runat="server" TargetControlID="DropDownList2"
Category="Model" PromptText="Please select a model" LoadingText="[Loading models...]"
ServiceMethod="GetDropDownContentsPageMethod" ParentControlID="DropDownList1" />
<ajaxToolkit:CascadingDropDown ID="CascadingDropDown3" runat="server" TargetControlID="DropDownList3"
Category="Color" PromptText="Please select a color" LoadingText="[Loading colors...]"
ServicePath="CarsService.asmx" ServiceMethod="GetDropDownContents"
ParentControlID="DropDownList2" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" RenderMode="inline">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="[No response provided yet]" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDownList3" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -