NavigateURLKey Property

Sets or returns the element name from which the navigate URL is retrieved from an advertisement.

public string NavigateURLKey {
   get,
   set
}

Remarks

The default is usually sufficient for compatibility with the Web Forms AdRotator control. However, individual <Choice> elements might override this setting to show alternate URLs for the advertisement.

Example

The following example demonstrates how to use the NavigateURLKey property to set https://Server/Page1.wml as the URL for the advertisement.

// .aspx file.
<Mobile:Form runat=server id=frmChoice Stylereference="styForm">
  <mobile:AdRotator runat=server id="Adrotator1"
     AdvertisementFile="ads3.xml" OnAdCreated="AdCreated_Event">
    <DeviceSpecific>
       <Choice Filter="isWML11" NavigateURLKey = "NavigateURLWml" 
           ImageUrlKey= "ImageUrlWml">
    </DeviceSpecific>
</Mobile:Form>

//ads3.xml file.
<?xml version="1.0" ?>
<Advertisements>
    <Ad>
        <ImageUrl>msaui.gif</ImageUrl>
        <ImageUrlWml>msaui.Wbmp</ImageUrlWml>
        <NavigateURL>https://www.microsoft.com</NavigateURL>
        <NavigateURLWml>https://Server/Page1.wml</NavigateURLWml>
        <AlternateText>This link should work</AlternateText>
        <Keyword>HTML</Keyword>
        <Impressions>80</Impressions>
    </Ad>
</Advertisements>

See Also

AdRotator Control

Applies to: AdRotator Class