PagerSettings.LastPageText Propriedade
Definição
Obtém ou define o texto a ser exibido para o botão de última página.Gets or sets the text to display for the last-page button.
public:
property System::String ^ LastPageText { System::String ^ get(); void set(System::String ^ value); };
public string LastPageText { get; set; }
member this.LastPageText : string with get, set
Public Property LastPageText As String
Valor da propriedade
O texto a ser exibido para o botão da última página.The text to display for the last-page button. O padrão é " & gt; & gt; ", que é renderizado como " > > ".The default is ">>", which renders as ">>".
Exemplos
O exemplo de código a seguir demonstra como usar a LastPageText propriedade para personalizar o texto que é exibido para o botão última página da linha do pager em um GridView controle.The following code example demonstrates how to use the LastPageText property to customize the text that is displayed for the last-page button of the pager row in a GridView control.
<%@ 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>PagerSetting Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>PagerSetting Example</h3>
<asp:gridview id="CustomerGridView"
datasourceid="CustomerDataSource"
autogeneratecolumns="true"
datakeynames="CustomerID"
allowpaging="true"
runat="server">
<pagersettings mode="NextPreviousFirstLast"
firstpagetext="First"
lastpagetext="Last"
nextpagetext="Next"
previouspagetext="Prev"
position="Bottom"/>
</asp:gridview>
<br/>
<asp:label id="MessageLabel"
forecolor="Red"
runat="server"/>
<!-- 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="CustomerDataSource"
selectcommand="Select [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] From [Customers]"
connectionstring="<%$ ConnectionStrings:NorthWindConnectionString%>"
runat="server"/>
</form>
</body>
</html>
<%@ 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>PagerSetting Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>PagerSetting Example</h3>
<asp:gridview id="CustomerGridView"
datasourceid="CustomerDataSource"
autogeneratecolumns="true"
datakeynames="CustomerID"
allowpaging="true"
runat="server">
<pagersettings mode="NextPreviousFirstLast"
firstpagetext="First"
lastpagetext="Last"
nextpagetext="Next"
previouspagetext="Prev"
position="Bottom"/>
</asp:gridview>
<br/>
<asp:label id="MessageLabel"
forecolor="Red"
runat="server"/>
<!-- 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="CustomerDataSource"
selectcommand="Select [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] From [Customers]"
connectionstring="<%$ ConnectionStrings:NorthWindConnectionString%>"
runat="server"/>
</form>
</body>
</html>
Comentários
Quando a Mode propriedade for definida como o NextPreviousFirstLast NumericFirstLast valor ou, use a LastPageText propriedade para especificar o texto a ser exibido para o botão de última página.When the Mode property is set to the NextPreviousFirstLast or NumericFirstLast value, use the LastPageText property to specify the text to display for the last-page button.
Observação
Como alternativa, você pode exibir uma imagem para o botão de última página definindo a LastPageImageUrl propriedade em vez da LastPageText propriedade.As an alternative, you can display an image for the last-page button by setting the LastPageImageUrl property instead of the LastPageText property. Se as LastPageImageUrl LastPageText Propriedades e estiverem definidas, a imagem será exibida com a LastPageText Propriedade atuando como texto alternativo para a imagem.If the LastPageImageUrl and LastPageText properties are both set, the image is displayed with the LastPageText property acting as the alternate text for the image. Em navegadores que dão suporte a dicas de ferramenta, esse texto também é exibido como uma dica de ferramenta para o botão correspondente.On browsers that support ToolTips, this text is also displayed as a ToolTip for the corresponding button.
O valor dessa propriedade é armazenado em estado de exibição.The value of this property is stored in view state.