1 <%@ Page Language="C#"
2 MasterPageFile="~/MasterPages/SamplePageWithCode.master" AutoEventWireup="true"
3 CodeFile="03_AtlasScript.aspx.cs"
4 Inherits="_01_AutoComplete_03_AtlasScript"
5 Title="TextBox 03: Atlas Script" %>
6 <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
7 <asp:TextBox ID="CustomerSearch" runat="server"></asp:TextBox>
8 <span id="completionList"></span>
9 <asp:button ID="SearchButton" runat="server" Text="Search" />
10 <script type="text/xml-script">
11 <page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
12 <components>
13 <textBox id="ctl00_MainContent_CustomerSearch"
14 targetElement="ctl00_MainContent_CustomerSearch">
15 <behaviors>
16 <autoComplete serviceURL="/LearnAtlas/CustomerService.asmx"
17 serviceMethod="GetCustomerAbbr"
18 minimumPrefixLength="1"
19 completionList="completionList" />
20 </behaviors>
21 </textBox>
22 </components>
23 </page>
24 </script>
25
26 <br />
27 <br />
28 This page also demonstrates the AutoComplete feature, but using client xml-script
29 as the base. Look at the source code to see that the rendered output from
30 the AutoCompleteExtender and the code used on this page match quite well.<br />
31 <br />
32 Using this method enables us to specify the "trigger" for the behavior, so now typing
33 "H" would yield more results.
34 </asp:Content>
|