随机伺服代码 [英] code for random adrotater
本文介绍了随机伺服代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<Advertisements>
<Ad>
<ImageUrl>~/pic/DSC_2097.JPG</ImageUrl>
<Width>500</Width>
<Height>500</Height>
<NavigateUrl>http://www.dotnetcurry.com</NavigateUrl>
<AlternateText>DotNetCurry Home Page</AlternateText>
<Impressions>90</Impressions>
<Keyword>small</Keyword>
</Ad>
<Ad>
<ImageUrl>~/pic/DSC_7252.JPG</ImageUrl>
<Width>500</Width>
<Height>500</Height>
<NavigateUrl>http://www.sqlservercurry.com</NavigateUrl>
<AlternateText>SQL Server Curry Home Page</AlternateText>
<Impressions>90</Impressions>
<Keyword>small</Keyword>
</Ad>
<Ad>
<ImageUrl>~/pic/DSC_7356.JPG</ImageUrl>
<Width>300</Width>
<Height>500</Height>
<NavigateUrl>http://www.dotnetcurry.com/writeforus.aspx</NavigateUrl>
<AlternateText>dotnetcurry.com Write For Us</AlternateText>
<Impressions>90</Impressions>
<Keyword>small</Keyword>
</Ad>
</Advertisements>
我将此代码添加到xml文件中..我向Web表单添加了一个adrotater ...我正在获取所有东西,但是...只要按一下按钮,那么....我的图像就在改变....
i added this code into xml file..and i add one adrotater to web form...am getting every thing but...whenever am cliking the button then only.. my image is chaning....
推荐答案
好吧,它应该如何工作.每次将页面发布到服务器并收到响应时,广告都会刷新.因此,我不确定您使用的是哪种技术,但是可以在固定的时间间隔后使用AJAX来部分更新页面的唯一广告轮播器部分,我想这将解决您的问题.
Well that''s exactly how it should be working. The ads gets refreshed every time the page gets posted to server and response comes. So i m not sure about which technology you are using but you can use AJAX for partially updating the only ad rotator section of your page, after fixed interval of time... that i suppose will solve your problem.
这篇关于随机伺服代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文