What you want to see on DotNetFunda.com ?
Go to DotNetFunda.com
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 18878 |  Welcome, Guest!   Register  Login
Home > Tutorials > ASP.NET Tutorials > AdRotator

Silverlight Tutorials | Report a Bug in the Tutorial
Found interesting? Add this to:


asp:AdRotator control
AdRotator control displays an image and updates both Image and target URL each time the page refreshes.
 
AdRotator control displays an image and updates both Image and target URL each time the page refreshes. When user clicks on the image, he/she is redirected to the target URL.

Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height etc. are implemented through style properites of <img>.
Generally, AdRotator control is used to show the advertisement banner on the page. The source of advertisements banners are written in a XML file in a certain format.

Following are some important properties that are very useful.
AdvertisementFile Location of the XML file that contains the image, target URL, and other details.
ImageUrl Url of image location.
AlternetText Appears if image not loaded properly
NavigateUrl The target link that will open when user clicks the image.
Impression A number that sets how often an advertisement banner will appear. This number is relative to numbers specified for other ads. eg. a banner with impression 60 will be shown twice as the banner with 30.
KeywordFilter Gets or sets a keyword to filter for a specific type of advertisements.
DEMO : AdRotator Show Source Code
Go to Label tutorials  
        // AdRotator contrl 
        <asp:AdRotator ID="AdRotator2" runat="Server" AdvertisementFile="~/tutorials/controls/controldata/adRotator.xml"
         ImageUrlField="ImageUrl" NavigateUrlField="NavigateUrl" AlternateTextField="AlternateText"
          BorderWidth="1" BorderColor="blue" />         
          
          // Advertisement File
          <Advertisements>
          <Ad>
            <ImageUrl>~/images/samples/DotNetLogo.gif</ImageUrl>
            <NavigateUrl>~/tutorials/controls/listbox.aspx</NavigateUrl>
            <AlternateText>Go to ListBox tutorials</AlternateText>
            <Impression>30</Impression>
          </Ad>
          <Ad>
            <ImageUrl>~/images/samples/NewAdvance.gif</ImageUrl>
            <NavigateUrl>~/tutorials/controls/button.aspx</NavigateUrl>
            <AlternateText>Go to Button tutorials</AlternateText>
            <Impression>15</Impression>
          </Ad>
          <Ad>
            <ImageUrl>~/images/samples/DotNetFunda3.gif</ImageUrl>
            <NavigateUrl>~/tutorials/controls/label.aspx</NavigateUrl>
            <AlternateText>Go to Label tutorials</AlternateText>
            <Impression>15</Impression>
          </Ad>
          <Ad>
            <ImageUrl>~/images/samples/DotNetFunda2.gif</ImageUrl>
            <NavigateUrl>~/tutorials/controls/calendar.aspx</NavigateUrl>
            <AlternateText>Go to Calendar control tutorials</AlternateText>
            <Impression>40</Impression>
          </Ad>
        </Advertisements>           
                    





About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/21/2013 8:55:48 PM