Export (0) Print
Expand All
Expand Minimize

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)

'Declaration
Public Overridable Property EnablePagingCallbacks As Boolean
<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="VB" %>

<!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>

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft