Export (0) Print
Expand All

DetailsView.EnablePagingCallbacks Property

Note: This property is new in the .NET Framework version 2.0.

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; }
/** @property */
public boolean get_EnablePagingCallbacks ()

/** @property */
public void set_EnablePagingCallbacks (boolean value)

public function get EnablePagingCallbacks () : boolean

public function set EnablePagingCallbacks (value : boolean)

Property Value

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#" %>

<html>
  <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 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft