AdRotator.KeywordFilter 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定用於從廣告檔案篩選廣告的分類關鍵字。 預設為空字串 ("")。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 具有 ASP.NET 的Mobile Apps & Sites。
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會選取具有相符關鍵詞的廣告。
AdvertisementFile如果屬性具有數據和此屬性KeywordFilter的內容,但此屬性與檔案之間沒有關鍵詞相符,則會顯示空白影像,併產生追蹤警告。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應