次の方法で共有


AdRotator.KeywordFilter プロパティ

定義

広告ファイルから広告をフィルター処理する際に使用できるカテゴリ キーワードを取得または設定します。 既定値は、空の文字列 ("") です。 この API は、互換性のために残されています。 ASP.NET モバイル アプリケーションを開発する方法については、「mobile Apps & Sites with ASP.NET」を参照してください。 この API は、互換性のために残されています。 ASP.NET モバイル アプリケーションを開発する方法については、「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

プロパティ値

特定のカテゴリ内で広告を識別する際に使用するキーワード。

属性

次のコード例では、 プロパティを KeywordFilter 使用して、 プロパティで参照されるファイル内のイメージのコレクションからユーザー設定を設定する方法を AdvertisementFile 示します。 完全なサンプル コードについては、クラスの概要に関するページを 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>
<!-- 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>

注釈

プロパティにAdvertisementFileデータがあり、このKeywordFilterプロパティにコンテンツがある場合、AdRotatorコントロールは一致するキーワード (keyword)を持つアドバタイズを選択します。

プロパティにAdvertisementFileデータがあり、このKeywordFilterプロパティにコンテンツがあるが、このプロパティとファイルの間に一致するキーワード (keyword)がない場合は、空白のイメージが表示され、トレース警告が生成されます。

適用対象

こちらもご覧ください