AdRotator.NavigateUrlKey Property

 

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 the www.asp.net/mobile Web site. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site.

Namespace:   System.Web.UI.MobileControls
Assembly:  System.Web.Mobile (in System.Web.Mobile.dll)

<BindableAttribute(True)>
Public Property NavigateUrlKey As String

Property Value

Type: System.String

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

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

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>

.NET Framework
Available since 1.1
Return to top
Show: