1 <%@ Page Language="C#"
2 MasterPageFile="~/MasterPages/SamplePageWithCode.master"
3 AutoEventWireup="true"
4 CodeFile="02_AtlasUpdatePanel.aspx.cs"
5 Inherits="_02_UpdatePanel_02_AtlasUpdatePanel"
6 Title="UpdatePanel 02: GridView w/Atlas Voodoo Magic" %>
7 <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
8 <asp:TextBox ID="CustomerSearch" runat="server"></asp:TextBox>
9 <asp:button ID="SearchButton" runat="server" Text="Search" />
10 <atlas:AutoCompleteExtender ID="AutoComplete" runat="server">
11 <atlas:AutoCompleteProperties Enabled="true"
12 ServiceMethod="GetCustomerAbbr"
13 ServicePath="~/CustomerService.asmx"
14 TargetControlID="CustomerSearch" />
15 </atlas:AutoCompleteExtender>
16 <br />
17 Without chaning the GridView at all, and putting it within an Atlas UpdatePanel
18 , we now have rich interactivity with the paging/sorting features, without the full
19 PostBack.<br />
20 <br />
21 <atlas:UpdatePanel ID="UpdateGrid" runat="server" Mode="conditional">
22 <ContentTemplate>
23 <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" DataSourceID="NWindDb" PageSize="5">
24 </asp:GridView>
25 </ContentTemplate>
26 </atlas:UpdatePanel>
27 <asp:SqlDataSource ID="NWindDb" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindDb %>"
28 SelectCommand="SELECT [CustomerID], [CompanyName], [ContactName], [Country] FROM [Customers]">
29 </asp:SqlDataSource>
30 </asp:Content>
31
32
|