日期:2014-05-18  浏览次数:20355 次

Asp.net 的AdRotator控件用xml 文件做为数据源出现了问题,大家帮帮我?
我在Asp.net页面中添加了一个AdRotator控件:
<asp:AdRotator   ID= "AdRotator1 "   runat= "server "
AdvertisementFile= "~/AdRotator/XMLFile1.xml "   />
我定义了XMLFile1.xml文件:
<?xml   version= "1.0 "   encoding= "utf-8 "   ?>
<Advertisments   xmlns= "http://schemas.microsoft.com/AspNet/AdRotator-Schedule-File ">
<Ad>
        <ImageUrl> ~/AdRotator/20067129223899_9187.jpg </ImageUrl>
        <NavigateUrl> http://msdn.microsoft.com </NavigateUrl>
        <Impressions> 10 </Impressions>
    </Ad>
    <Ad>
        <ImageUrl> ~/AdRotator/pic01587.jpg </ImageUrl>
        <NavigateUrl> http://msdn.microsoft.com </NavigateUrl>
        <Impressions> 1000 </Impressions>
    </Ad>
</Advertisments>

在AdRotator目录下确实存在pic01587.jpg   和20067129223899_9187.jpg。
但当我运行包含AdRotator控件的asp页面时候总是报如下的错误:
The   AdRotator   AdRotator1   could   not   find   the   AdvertisementFile   or   the   file   is   invalid.
 
    请问我到底错在什么地方?该如何解决这个问题?

------解决方案--------------------
mark
------解决方案--------------------
是否是路径问题