InternetUnicodeHTMLCSSScalable Vector Graphics (SVG)Extensible Markup Language (xml) ASP.Net TOCASP.NetMiscellaneous FeatureASP.NET ScriptingASP.NET Run-time Object na Draft for Information Only
Content
AdRotator Web Server Control
AdRotator Web Server ControlThe AdRotator Web server control can be used to display graphics that are linked to other pages. The list of graphics to be displayed and the associated target links is maintained in a data source such as an XML file or database. ScenariosThe AdRotator Web server control provides a way to display advertisements (ads) on your ASP.NET Web pages. The control displays a .gif file or other graphic image that you provide. When users click the ad, they are redirected to a target URL that you have specified. The control automatically reads advertisement information, such as the graphic file name and the target URL, from a list of ads that you provide using a data source, which is usually an XML file or a database table. The AdRotator control selects ads randomly, changing the displayed ad each time the page is refreshed. Ads can be weighted to control the priority level of banners, making it possible to have certain ads display more often than others. You can also write custom logic that cycles through the ads. BackgroundThe AdRotator Web server control can be used to display ad graphics such as a .gif or similar image. The user can then be redirected to a target URL. The graphic and target URL can be provided from a data source such as an XML file. Ad information can come from a variety of sources, such as the following:
XML File Format for Ad FilesOne method of storing ad-banner image locations, URLs for redirection, and associated properties is to put the information in an XML file. By using the XML file format, you can create and maintain a list of advertisements without having to change the code in your application whenever a change is made to an advertisement. For details, see How to: Display Ads From an XML File Using the AdRotator Web Server Control. Database Schema for Ad FilesInstead of creating an XML file for ad information, you can store ad information in a database table. The table requires a specific schema that the AdRotator control can read. For details, see How to: Display Ads From a Database Using the AdRotator Web Server Control. Filtering Ads by KeywordIn the advertisement file, you can assign categories to ads by using the Keyword attribute and then configuring the AdRotator control to show ads according to the filter criteria that you specify. For example, if an ad file contains categories for both banks and hardware stores, you might want the page to display only ads that are related to banks. By setting the AdRotator control's KeywordFilter property to "banks," you can have the control filter out the hardware store ads. If a filter is specified, one of the following two situations can result:
Tracking Ad ResponseThe AdRotator control does not inherently provide a way to gather statistics about which ads users have clicked, how many times an ad has been clicked, and so on. However, because you have control over the URL to which the ad points, you can add tracking logic for the ads to your application. A typical way to do this is to point all ads to a tracking page that first gathers the statistics you want, and then jumps to the ad's destination page. Caching AdsIf the page that contains the AdRotator control is cached, the AdRotator control automatically performs cache substitution to replace the cached ad with a new one whenever the page is retrieved from the cache. For more information, see Dynamically Updating Portions of a Cached Page. Class ReferenceThe following table lists the classes that relate to the AdRotator control.
See AlsoCode Examples
Other Resources
Source/Reference
©sideway ID: 190600021 Last Updated: 6/21/2019 Revision: 0 Ref: ![]() References
![]() Latest Updated Links
![]() ![]() ![]() ![]() ![]() |
![]() Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Travel 18 Reference 79 Computer Hardware 254 Software Application 213 Digitization 37 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 431 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019