NumericPagerField.PreviousPageImageUrl Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Obtém ou define a URL de uma imagem que é exibida para o botão da página anterior no NumericPagerField objeto.
public:
property System::String ^ PreviousPageImageUrl { System::String ^ get(); void set(System::String ^ value); };
public string PreviousPageImageUrl { get; set; }
member this.PreviousPageImageUrl : string with get, set
Public Property PreviousPageImageUrl As String
Valor de Propriedade
A URL de uma imagem que é exibida para o botão da página anterior no NumericPagerField objeto. O padrão é uma cadeia vazia (""), o que indica que a PreviousPageImageUrl propriedade não está definida.
Exemplos
O exemplo seguinte mostra como mostrar uma imagem para o botão da página anterior no NumericPagerField objeto de um DataPager controlo.
<%@ 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 id="Head1" runat="server">
<title>NumericPagerField Example</title>
<style type="text/css">
.header { background-color:#8FBC8F; }
table { border: solid 1px #000000; }
</style>
</head>
<body>
<form id="form1" runat="server">
<h3>NumericPagerField Example</h3>
<asp:ListView ID="VendorsListView"
DataSourceID="VendorsDataSource"
runat="server">
<LayoutTemplate>
<table cellpadding="2" width="640px" runat="server" id="tblVendor">
<tr align="center" class="header" runat="server">
<td runat="server">ID</td>
<td runat="server">Vendor Name</td>
<td runat="server">Active</td>
</tr>
<tr id="itemPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr runat="server">
<td>
<asp:Label ID="VendorIDLabel" runat="server" Text='<%#Eval("VendorID") %>' />
</td>
<td>
<asp:Label ID="NameLabel" runat="server" Text='<%#Eval("Name") %>' />
</td>
<td align="center">
<asp:CheckBox ID="ActiveFlagCheck" runat="server"
Checked='<%#Eval("ActiveFlag") %>'
Enabled="false" />
</td>
</tr>
</ItemTemplate>
</asp:ListView>
<asp:DataPager runat="server" ID="ContactsDataPager"
PagedControlID="VendorsListView"
PageSize="10">
<Fields>
<asp:NumericPagerField
NextPageImageUrl="~/images/next.gif"
PreviousPageImageUrl="~/images/previous.gif"
ButtonType="Image" />
</Fields>
</asp:DataPager>
<!-- This example uses Microsoft SQL Server and connects -->
<!-- to the AdventureWorks sample database. Use an ASP.NET -->
<!-- expression to retrieve the connection string value -->
<!-- from the Web.config file. -->
<asp:SqlDataSource ID="VendorsDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:AdventureWorks_DataConnectionString %>"
SelectCommand="SELECT [VendorID], [Name], [ActiveFlag] FROM Purchasing.Vendor">
</asp:SqlDataSource>
</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 id="Head1" runat="server">
<title>NumericPagerField Example</title>
<style type="text/css">
.header { background-color:#8FBC8F; }
table { border: solid 1px #000000; }
</style>
</head>
<body>
<form id="form1" runat="server">
<h3>NumericPagerField Example</h3>
<asp:ListView ID="VendorsListView"
DataSourceID="VendorsDataSource"
runat="server">
<LayoutTemplate>
<table cellpadding="2" width="640px" runat="server" id="tblVendor">
<tr align="center" class="header" runat="server">
<td runat="server">ID</td>
<td runat="server">Vendor Name</td>
<td runat="server">Active</td>
</tr>
<tr id="itemPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr runat="server">
<td>
<asp:Label ID="VendorIDLabel" runat="server" Text='<%#Eval("VendorID") %>' />
</td>
<td>
<asp:Label ID="NameLabel" runat="server" Text='<%#Eval("Name") %>' />
</td>
<td align="center">
<asp:CheckBox ID="ActiveFlagCheck" runat="server"
Checked='<%#Eval("ActiveFlag") %>'
Enabled="false" />
</td>
</tr>
</ItemTemplate>
</asp:ListView>
<asp:DataPager runat="server" ID="ContactsDataPager"
PagedControlID="VendorsListView"
PageSize="10">
<Fields>
<asp:NumericPagerField
NextPageImageUrl="~/images/next.gif"
PreviousPageImageUrl="~/images/previous.gif"
ButtonType="Image" />
</Fields>
</asp:DataPager>
<!-- This example uses Microsoft SQL Server and connects -->
<!-- to the AdventureWorks sample database. Use an ASP.NET -->
<!-- expression to retrieve the connection string value -->
<!-- from the Web.config file. -->
<asp:SqlDataSource ID="VendorsDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:AdventureWorks_DataConnectionString %>"
SelectCommand="SELECT [VendorID], [Name], [ActiveFlag] FROM Purchasing.Vendor">
</asp:SqlDataSource>
</form>
</body>
</html>
Observações
Quando a ButtonType propriedade está definida para ButtonType.Image, use a PreviousPageImageUrl propriedade para especificar o URL de uma imagem que é exibida para o botão da página anterior. A imagem pode estar em qualquer formato de ficheiro suportado em navegadores, como .jpg, .gif, .bmpe .png.
Quando a ButtonType propriedade é definida para um valor diferente de ButtonType.Image, definir a PreviousPageImageUrl propriedade não tem efeito.
O valor desta propriedade é armazenado no estado de visualização.