Rediger

Del via


AdRotator.NavigateUrlKey Property

Definition

Gets or sets the name of the element that contains the target URL. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public:
 property System::String ^ NavigateUrlKey { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(true)]
public string NavigateUrlKey { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.NavigateUrlKey : string with get, set
Public Property NavigateUrlKey As String

Property Value

The name of the element in the XML file that contains the target URL.

Attributes

Examples

The following code example demonstrates how to use the NavigateUrlKey property to set the target URL for the advertisement. 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>

Remarks

You can use <Choice> elements to override this setting to show alternate URLs for the advertisement.

Applies to

See also