DetailsView.EnablePagingCallbacks Property
Gets or sets a value indicating whether client-side callback functions are used for paging operations in the DetailsView control.
Assembly: System.Web (in System.Web.dll)
Property Value
Type: System.Booleantrue 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.
Note |
|---|
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>
Available since 2.0
