AdRotator.KeywordFilter Propriedade
Definição
Obtém ou define uma palavra-chave de categoria que você pode usar para filtrar anúncios de um arquivo de anúncio.Gets or sets a category keyword that you can use to filter advertisements from an advertisement file. O padrão é uma cadeia de caracteres vazia ("").The default is an empty string (""). Esta API está obsoleta.This API is obsolete. Para saber mais sobre como desenvolver aplicativos móveis ASP.NET, veja Mobile Apps & Sites with ASP.NET (Aplicativos móveis e sites com ASP.NET).For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. Esta API está obsoleta.This API is obsolete. Para saber mais sobre como desenvolver aplicativos móveis ASP.NET, veja Mobile Apps & Sites with ASP.NET (Aplicativos móveis e sites com ASP.NET).For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.
public:
property System::String ^ KeywordFilter { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(true)]
public string KeywordFilter { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.KeywordFilter : string with get, set
Public Property KeywordFilter As String
Valor da propriedade
A palavra-chave usada para identificar anúncios em uma categoria específica.The keyword used to identify advertisements within a specific category.
- Atributos
Exemplos
O exemplo de código a seguir demonstra como usar a KeywordFilter propriedade para definir a preferência de uma coleção de imagens no arquivo referenciado pela AdvertisementFile propriedade.The following code example demonstrates how to use the KeywordFilter property to set the preference from a collection of images in the file referred by the AdvertisementFile property. Para obter o código de exemplo completo, consulte a AdRotator visão geral da classe.For the complete sample code, see the AdRotator class overview.
<!-- The AdRotator control -->
<mobile:AdRotator id="AdControl" runat="server"
ImageKey="MobileImgSrc" NavigateUrlKey="TargetUrl"
AdvertisementFile="App_Data/ads.xml" Alignment="Left"
KeywordFilter="Developer" OnAdCreated="AdCreated_Event">
<DeviceSpecific>
<Choice Filter="isWML11" NavigateUrlKey="WmlTargetUrl"
ImageKey= "WmlImageSrc" />
</DeviceSpecific>
</mobile:AdRotator>
<!-- The AdRotator control -->
<mobile:AdRotator id="AdControl" runat="server"
ImageKey="MobileImgSrc" NavigateUrlKey="TargetUrl"
AdvertisementFile="App_Data/ads.xml" Alignment="Left"
KeywordFilter="Developer" OnAdCreated="AdCreated_Event">
<DeviceSpecific>
<Choice Filter="isWML11" NavigateUrlKey="WmlTargetUrl"
ImageKey= "WmlImageSrc" />
</DeviceSpecific>
</mobile:AdRotator>
Comentários
Se a AdvertisementFile propriedade tiver dados e essa KeywordFilter propriedade tiver conteúdo, o AdRotator controle selecionará um anúncio com uma palavra-chave correspondente.If the AdvertisementFile property has data and this KeywordFilter property has content, the AdRotator control selects an advertisement with a matching keyword.
Se a AdvertisementFile propriedade tiver dados e essa KeywordFilter propriedade tiver conteúdo, mas não houver nenhuma correspondência de palavra-chave entre essa propriedade e o arquivo, será exibida uma imagem em branco e um aviso de rastreamento será gerado.If the AdvertisementFile property has data and this KeywordFilter property has content but there is no keyword match between this property and the file, a blank image displays and a trace warning is generated.