Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DetailsView.EnablePagingCallbacks Property

Gets or sets a value indicating whether client-side callback functions are used for paging operations in the DetailsView control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public virtual bool EnablePagingCallbacks { get; set; }
<asp:DetailsView EnablePagingCallbacks="True|False" />

Property Value

Type: System.Boolean
true to use client-side callback functions for paging operations; otherwise, false. The default is false.

Use the EnablePagingCallbacks property to specify whether paging operations are performed using client-side callback functions. When enabled, paging is performed using the callback feature, which prevents the need to post the page back to the server.

NoteNote:

The client-side paging feature is only supported in Microsoft Internet Explorer 5.5 and later and Netscape 6.0 and later.

The value of EnablePagingCallbacks is stored in view state.

The following code example demonstrates how to use the EnablePagingCallbacks property to enable the use of client-side callback functions for paging operations.

<%@ Page language="C#" %>

<!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>DetailsView EnablePagingCallbacks Example</title>
</head>
<body>
    <form id="Form1" runat="server">

      <h3>DetailsView EnablePagingCallbacks Example</h3>

        <asp:detailsview id="CustomerDetailView"
          datasourceid="DetailsViewSource"
          autogeneraterows="true"  
          allowpaging="true"
          enablepagingcallbacks="true" 
          runat="server">

          <fieldheaderstyle backcolor="Navy"
            forecolor="White"/>

          <pagersettings mode="NextPreviousFirstLast"
            firstpagetext="First"
            lastpagetext="Last"
            nextpagetext="Next"
            previouspagetext="Prev"/>

          <pagerstyle forecolor="White"
            backcolor="Blue"
            font-names="Arial"
            font-size="8" />   

        </asp:detailsview>

        <!-- This example uses Microsoft SQL Server and connects  -->
        <!-- to the Northwind sample database. Use an ASP.NET     -->
        <!-- expression to retrieve the connection string value   -->
        <!-- from the web.config file.                            -->
        <asp:SqlDataSource ID="DetailsViewSource" runat="server" 
          ConnectionString=
            "<%$ ConnectionStrings:NorthWindConnectionString%>"
          InsertCommand="INSERT INTO [Customers]([CustomerID],
            [CompanyName], [Address], [City], [PostalCode], [Country]) 
            VALUES (@CustomerID, @CompanyName, @Address, @City, 
            @PostalCode, @Country)"

          SelectCommand="Select [CustomerID], [CompanyName], 
            [Address], [City], [PostalCode], [Country] From 
            [Customers]">
        </asp:SqlDataSource>
    </form>
  </body>
</html>

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

ADD
Show:
© 2015 Microsoft