How to use for Adrottetor in my web site?
pl z... all about discus and give any Essy example.

Dani AI

Generated

This thread is about using the ASP.NET AdRotator control. asked how to use it, pointed to Microsoft guidance, and gave a quick XML-based how-to. The notes below add practical, production-focused points and common gotchas that are not covered in the original replies.

Keep the ad source and paths correct and secure. Store your ad data where the app can read it but clients cannot browse it (App_Data is a common choice). Verify file permissions and that image URLs are reachable from the browser (check the Network console for 404s or mixed-content warnings on HTTPS sites). On non-Windows hosts, remember file paths are case-sensitive. If images fail to appear, validate the ad source XML is well-formed and that the server can open the file.

Make ads production-ready. Avoid direct external URLs in the source if you need tracking or validation—use a short server-side redirect that logs the click then forwards the user. Sanitize and restrict redirect targets to prevent open-redirect risks. Serve ad images from a CDN when possible and use responsive CSS (max-width:100%; height:auto) so ads scale on mobile. AdRotator is a WebForms control; for modern MVC/SPAs consider client-side rotation or ad services that return JSON and support lazy-loading and viewability measurement.

Recommended Answers

All 2 Replies

Read this article -

Follow These Steps:
1.Add new folder to website and name it images
2.Add desire pictures to this folder.
3.Now add xml file.
4.write the following code

<?xml version="1.0" encoding="utf-8" ?>
<Advertisements>
  <Ad>
    <ImageUrl>images/1.jpg</ImageUrl>
  </Ad>
  <Ad>
    <ImageUrl>images/2.jpg</ImageUrl>
  </Ad>
  <Ad>
    <ImageUrl>images/3.jpg</ImageUrl>
  </Ad>
  <Ad>
    <ImageUrl>images/4.jpg</ImageUrl>
  </Ad>

</Advertisements>

5.Add adrotator to web page.
6.Now add xml file from adrotator property->AdvertisementFile
7.Save and Press F5.
8.Run
9.Enjoy
10.Thanks to me.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.