asp:AdRotator 的应用.--主要用来添加广告栏. |
The AdRotator Web server control provides a convenient way to display advertisements (ads) on your ASP.NET Web pages. 1.An XML file (1)How to: Display Ads From an XML File Using the AdRotator Web Server Control The AdRotator Web server control reads advertisement (ad) information from a data source, which one or more ad records. You can store ad information in an XML file and then bind the AdRotator control to the file. All attributes of the AdRotator control are optional. The following attributes can be included in the XML files: ImageUrl The URL of the image to display. NavigateUrl The URL of the page to go to when the AdRotator control is clicked. AlternateText The text to display if the image is unavailable. Keyword The category of the ad, which can be used to filter for specific ads. Impressions A numeric value (a weighting number) that indicates the likelihood of how often the ad is displayed. The total of all impressions values in the XML file cannot exceed 2,048,000,000 - 1. Height The height of the ad in pixels. This value overrides the default height setting for the AdRotator control. Width The width of the ad in pixels. This value overrides the default width setting for the AdRotator control example: The AdRotator control reads advertisement information from a data source, which contains one or more ad records. You can store ad information in a database table with a specific schema, and then use a data source control to read the ad records at run time. If you have an existing table with ad information, you can map the schema of your table to the fields that are required by the AdRotator control. You can store ad information in any type of database, as long as you have the corresponding data source control for that database. 通过从tool中托拽SqlDatasource控件并进行连接等设置得来. webform端代码. <<<..........还需继续看.......>>> 2.Any data source control, such as the SqlDataSource or ObjectDataSource controls 3.Custom logic
|
|
