本文介绍了Adrotator现在显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<?xml version="1.0" encoding="utf-8" ?>
<Advertisements >
    <Ad >
        <ImageUrl>~/Image/Bluehills.jpg </ImageUrl>
        <AlternateText>Childhood</AlternateText>
        <Impressions>1</Impressions>
    </Ad>
    <Ad >
        <ImageUrl> ~/Image/Sunset.jpg </ImageUrl>
        <AlternateText>Beak</AlternateText>
        <Impressions>1</Impressions>
    </Ad>
    <Ad >
        <ImageUrl> ~/Image/Waterlilies.jpg </ImageUrl>
        <AlternateText>Bird</AlternateText>
        <Impressions>1</Impressions>
    </Ad>
    <Ad >
        <ImageUrl> ~/Image/Winter.jpg </ImageUrl>
        <AlternateText>Circle And Square</AlternateText>
        <Impressions>1</Impressions>
    </Ad>

</Advertisements>





<asp:AdRotator ID="AdRotator1" runat="server"
            AdvertisementFile="~/xml/XMLAdrotator.xml" Height="200px" Width="300px" />




请向我提出为什么图像无法显示的建议?




Please provide me with suggestion why images are not showing up?

推荐答案

 <asp:xmldatasource id="XmlDataSource1" runat="server" datafile="~/xml/XMLAdRotator.xml" />
<asp:adrotator id="AdRotator1" runat="server" DataSourceID="XmlDataSource1" Style="position: static" Width="170px" Height="106px" />


这样,您可以根据需要将XmlDataSource设置为任意数量的AdRotator的dataSource.


In this way, you can set the XmlDataSource as dataSource for as many AdRotators as you want.




这篇关于Adrotator现在显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 21:28