Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I tried to use ADROTATOR control but couldnt make it.
i tried following code

ads.xml
<advertisements>
	<ad>
		<imageurl>
			ccit%20building.jpg
		</imageurl>
		<navigateurl>
			http://www.ccit.in
		</navigateurl>
		<targeturl>
			_blank
			
		</targeturl>
		<keyword>
			sites
		</keyword>
		<impressions>
			2
		</impressions>
	</ad>
	<ad>
		<imageurl>
			sw_lef001.png
		</imageurl>
		<navigateurl>
			http://www.ccit.in
		</navigateurl>
		<targeturl>
			_blank

		</targeturl>
		<keyword>
			s/w sites
		</keyword>
		<impressions>
			1
		</impressions>
		
	</ad>
	
</advertisements>



in adrotator.aspx

<body>
    <form id="form1"  runat="server">
    <div>
    <asp:AdRotator ID="AdRotator1"    runat="server"  
        AdvertisementFile="~/ads.xml"/>
  
    
    </div>
    </form>
</body>
</html>


i got following error while executing


Server Error in '/xml' Application.
--------------------------------------------------------------------------------

The AdRotator AdRotator1 could not find the AdvertisementFile or the file is invalid.



Please hep

regards
Posted
Comments
harshavardhan12345678 8-Aug-14 3:43am    
issue solved thanks alot

You error tells you what the problem is. You need to ensure that the file exists where it is expected and that the file name is correct.
 
Share this answer
 
Comments
shivani 2013 22-Jun-11 9:14am    
sir file exists

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900