Adrotator现在显示图像 [英] Adrotator now showing image

查看:117
本文介绍了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?

推荐答案

可能存在路径问题.



添加一个XmlDataSource,然后将AdRotator的DataSourceID设置为该XmlDataSource.
例如:
There may be a path problem.

OR

Add an XmlDataSource and then, set DataSourceID of AdRotator to that XmlDataSource.
eg:
 <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.



在imageurl标签处,使用解析的图像URL路径,即"http://mysite.com/Image/Bluehills.jpg".希望这可以解决您的问题.
Hi,
At imageurl tag use Resolved image URL path, i.e. "http://mysite.com/Image/Bluehills.jpg".Hope this will solve your issue.


查看以下类似的帖子:

http://logicsmeet.com/forum/15341-Problem-with-Ad-rotator- control.aspx [ ^ ]

http://support.microsoft.com/kb/305035 [广告旋转子代码版本. 1.7
如何:使用AdRotator Web服务器控件从XML文件显示广告
ASP.NET Web项目路径
Check out the following similar posts:

http://logicsmeet.com/forum/15341-Problem-with-Ad-rotator-control.aspx[^]

http://support.microsoft.com/kb/305035[^]

Read the following for better concept:

Ad rotator tag ver. 1.7
How to: Display Ads From an XML File Using the AdRotator Web Server Control
ASP.NET Web Project Paths


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆