-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
AdRotator.xml
471 lines (417 loc) · 36.3 KB
/
AdRotator.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
<Type Name="AdRotator" FullName="System.Web.UI.MobileControls.AdRotator">
<TypeSignature Language="C#" Value="public class AdRotator : System.Web.UI.MobileControls.MobileControl" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit AdRotator extends System.Web.UI.MobileControls.MobileControl" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.MobileControls.AdRotator" />
<TypeSignature Language="VB.NET" Value="Public Class AdRotator
Inherits MobileControl" />
<TypeSignature Language="F#" Value="type AdRotator = class
 inherit MobileControl" />
<TypeSignature Language="C++ CLI" Value="public ref class AdRotator : System::Web::UI::MobileControls::MobileControl" />
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.UI.MobileControls.MobileControl</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultEvent("AdCreated")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultEvent("AdCreated")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultProperty("AdvertisementFile")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultProperty("AdvertisementFile")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Designer(typeof(System.Web.UI.Design.MobileControls.AdRotatorDesigner))]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Designer(typeof(System.Web.UI.Design.MobileControls.AdRotatorDesigner))>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.ToolboxItem(typeof(System.Web.UI.Design.WebControlToolboxItem))]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.ToolboxItem(typeof(System.Web.UI.Design.WebControlToolboxItem))>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Web.UI.MobileControls.DesignerAdapter(typeof(System.Web.UI.Design.MobileControls.Adapters.DesignerAdRotatorAdapter))]</AttributeName>
<AttributeName Language="F#">[<System.Web.UI.MobileControls.DesignerAdapter(typeof(System.Web.UI.Design.MobileControls.Adapters.DesignerAdRotatorAdapter))>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Web.UI.ToolboxData("<{0}:AdRotator runat="server"></{0}:AdRotator>")]</AttributeName>
<AttributeName Language="F#">[<System.Web.UI.ToolboxData("<{0}:AdRotator runat="server"></{0}:AdRotator>")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides a server control to display a randomly selected advertisement on a mobile page. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.MobileControls.AdRotator> class uses the same configuration file as the Web Forms <xref:System.Web.UI.WebControls.AdRotator> class. The <xref:System.Web.UI.MobileControls.AdRotator?displayProperty=nameWithType> mobile control exposes many of the same properties and events as the <xref:System.Web.UI.WebControls.AdRotator?displayProperty=nameWithType> control, plus it adds mobile capability. The displayed advertisement changes whenever the page is refreshed.
The <xref:System.Web.UI.MobileControls.AdRotator.AdvertisementFile%2A> property specifies the location of an XML file that contains advertisement information. This file must reside within the application domain. For security purposes, XML files should be in the App_Data folder, which is configured to not allow users direct access to XML files. If the <xref:System.Web.UI.MobileControls.AdRotator.AdvertisementFile%2A> property is empty, the <xref:System.Web.UI.MobileControls.AdRotator> control generates a single break tag as a placeholder. This is useful when you do not want to display an advertisement.
## Examples
The following code example consists of two parts: an ASP.NET mobile Web Forms page in an `.aspx` file and an XML file. The `.aspx` file uses a file named `ads.xml` to rotate through various advertisements based on the <xref:System.Web.UI.MobileControls.AdRotator.KeywordFilter%2A> property. If you provide the images for the example, they will be displayed; otherwise, the <xref:System.Web.UI.MobileControls.AdRotator> control displays the value of the <xref:System.Web.UI.MobileControls.Image.AlternateText%2A> property for the advertisements. When the user refreshes the mobile Web Forms page, the page displays the next randomly selected advertisement, based on the <xref:System.Web.UI.MobileControls.AdRotator.KeywordFilter%2A>.
The example also shows how to use a [\<Choice>](https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)) element to override the properties if the user's browser requires WML markup, and how to map the image's `src` and `href` attributes to the data in the XML file using the <xref:System.Web.UI.MobileControls.AdRotator.ImageKey%2A> and <xref:System.Web.UI.MobileControls.AdRotator.NavigateUrlKey%2A> properties, respectively.
Although the example uses a function to determine whether the browser requires WML (`isWML11`), you can instead use a Web.config file to define a <xref:System.Web.UI.MobileControls.DeviceSpecific> element that the .NET Framework automatically uses to make the determination for you:
> [!NOTE]
> The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see [ASP.NET Web Forms Page Code Model](https://learn.microsoft.com/previous-versions/aspnet/015103yb(v=vs.100)).
The `.aspx` file:
[!code-aspx-csharp[MobileAdRotatorSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileAdRotatorSample/CS/MobileHome.aspx#1)]
[!code-aspx-vb[MobileAdRotatorSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileAdRotatorSample/VB/MobileHome.aspx#1)]
The sample `ads.xml` file (which must be located in the **App_Data** folder):
[!code-xml[MobileAdRotatorSample#2](~/snippets/common/VS_Snippets_WebNet/MobileAdRotatorSample/Common/ads.xml#2)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.AdRotator" />
<altmember cref="P:System.Web.UI.MobileControls.AdRotator.AdvertisementFile" />
<altmember cref="P:System.Web.UI.MobileControls.Image.AlternateText" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/dotnet/netframework-3.0/0x3wcsew(v=vs.85)">Introduction to the AdRotator Control</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)"><Choice> Element</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public AdRotator ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.MobileControls.AdRotator.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 AdRotator();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.MobileControls.AdRotator" /> class. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.MobileControls.AdRotator?displayProperty=nameWithType> mobile control exposes many of the same properties and events as the <xref:System.Web.UI.WebControls.AdRotator?displayProperty=nameWithType> control, plus it adds mobile capability.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.AdRotator" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/dotnet/netframework-3.0/0x3wcsew(v=vs.85)">Introduction to the AdRotator Control</related>
</Docs>
</Member>
<Member MemberName="AdCreated">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.AdCreatedEventHandler AdCreated;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.AdCreatedEventHandler AdCreated" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.MobileControls.AdRotator.AdCreated" />
<MemberSignature Language="VB.NET" Value="Public Custom Event AdCreated As AdCreatedEventHandler " />
<MemberSignature Language="F#" Value="member this.AdCreated : System.Web.UI.WebControls.AdCreatedEventHandler " Usage="member this.AdCreated : System.Web.UI.WebControls.AdCreatedEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:
 event System::Web::UI::WebControls::AdCreatedEventHandler ^ AdCreated;" />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.AdCreatedEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs each time an advertisement is displayed. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the <xref:System.Web.UI.MobileControls.AdRotator.AdvertisementFile%2A> property is set, this event occurs after the advertisement has been selected from the file.
The event handler receives an <xref:System.Web.UI.WebControls.AdCreatedEventArgs> property that contains the properties of the advertisement being displayed. The following table shows the properties that provide information specific to this event.
|Property|Description|
|--------------|-----------------|
|<xref:System.Web.UI.WebControls.AdCreatedEventArgs.AdProperties%2A>|Returns the dictionary that contains all the advertisement properties extracted from an XML file after the <xref:System.Web.UI.MobileControls.AdRotator.AdCreated> event is raised.|
|<xref:System.Web.UI.MobileControls.Image.AlternateText%2A>|Specifies the alternate text and ToolTip (if supported by the browser) to be rendered in the <xref:System.Web.UI.MobileControls.AdRotator> control.|
|<xref:System.Web.UI.WebControls.AdCreatedEventArgs.ImageUrl%2A>|Specifies the image to be rendered in the <xref:System.Web.UI.MobileControls.AdRotator> control.|
|<xref:System.Web.UI.WebControls.AdCreatedEventArgs.NavigateUrl%2A>|Specifies the URL reference that the browser navigates to when the advertisement is clicked.|
## Examples
The following code sample handles the <xref:System.Web.UI.MobileControls.AdRotator.AdCreated> event, and is only part of a larger example for the <xref:System.Web.UI.MobileControls.AdRotator> class overview.
[!code-csharp[MobileAdRotatorSample#3](~/snippets/csharp/VS_Snippets_WebNet/MobileAdRotatorSample/CS/MobileHome.aspx#3)]
[!code-vb[MobileAdRotatorSample#3](~/snippets/visualbasic/VS_Snippets_WebNet/MobileAdRotatorSample/VB/MobileHome.aspx#3)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.AdRotator" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/dotnet/netframework-3.0/0x3wcsew(v=vs.85)">Introduction to the AdRotator Control</related>
</Docs>
</Member>
<Member MemberName="AdvertisementFile">
<MemberSignature Language="C#" Value="public string AdvertisementFile { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string AdvertisementFile" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.MobileControls.AdRotator.AdvertisementFile" />
<MemberSignature Language="VB.NET" Value="Public Property AdvertisementFile As String" />
<MemberSignature Language="F#" Value="member this.AdvertisementFile : string with get, set" Usage="System.Web.UI.MobileControls.AdRotator.AdvertisementFile" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ AdvertisementFile { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Bindable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Bindable(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue("")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue("")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Editor(typeof(System.Web.UI.Design.XmlUrlEditor), typeof(System.Drawing.Design.UITypeEditor))]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Editor(typeof(System.Web.UI.Design.XmlUrlEditor), typeof(System.Drawing.Design.UITypeEditor))>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the path to the XML file that contains advertisement data. The default value is an empty string (""). This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>.</summary>
<value>The path to the XML file containing the properties of the advertisements to render in the <see langword="AdRotator" /> control. For security purposes, XML files should be placed in the App_Data folder, which is configured to not allow users direct access to XML files.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The file format and file name restrictions conform to those described for the <xref:System.Web.UI.WebControls.AdRotator.AdvertisementFile%2A?displayProperty=nameWithType> property.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.AdRotator" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/dotnet/netframework-3.0/0x3wcsew(v=vs.85)">Introduction to the AdRotator Control</related>
</Docs>
</Member>
<Member MemberName="CreateWebAdRotator">
<MemberSignature Language="C#" Value="protected virtual System.Web.UI.WebControls.AdRotator CreateWebAdRotator ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Web.UI.WebControls.AdRotator CreateWebAdRotator() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.MobileControls.AdRotator.CreateWebAdRotator" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function CreateWebAdRotator () As AdRotator" />
<MemberSignature Language="F#" Value="abstract member CreateWebAdRotator : unit -> System.Web.UI.WebControls.AdRotator
override this.CreateWebAdRotator : unit -> System.Web.UI.WebControls.AdRotator" Usage="adRotator.CreateWebAdRotator " />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual System::Web::UI::WebControls::AdRotator ^ CreateWebAdRotator();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.AdRotator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a new <see cref="T:System.Web.UI.MobileControls.AdRotator" /> object. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>.</summary>
<returns>An <see cref="T:System.Web.UI.MobileControls.AdRotator" /> object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is provided for the control developer to override the standard <xref:System.Web.UI.MobileControls.AdRotator> class.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.AdRotator" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/dotnet/netframework-3.0/0x3wcsew(v=vs.85)">Introduction to the AdRotator Control</related>
</Docs>
</Member>
<Member MemberName="ImageKey">
<MemberSignature Language="C#" Value="public string ImageKey { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ImageKey" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.MobileControls.AdRotator.ImageKey" />
<MemberSignature Language="VB.NET" Value="Public Property ImageKey As String" />
<MemberSignature Language="F#" Value="member this.ImageKey : string with get, set" Usage="System.Web.UI.MobileControls.AdRotator.ImageKey" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ ImageKey { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Bindable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Bindable(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue("ImageUrl")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue("ImageUrl")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns the element name from which the image URL is retrieved from an advertisement. The default value is "ImageUrl". This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>.</summary>
<value>The element name from which the image URL is retrieved for an advertisement.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can create elements in the source XML file for a variety of purposes. For example, you may want to use the same XML file for both mobile pages and Web pages, but want a different image file for each one. Use the <xref:System.Web.UI.MobileControls.AdRotator.ImageKey%2A> property to specify which element in your XML file you want to use for the image URL.
You can also use separate [\<Choice>](https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)) elements to override this setting to show alternate images for the advertisement.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.MobileControls.AdRotator.ImageKey%2A> property to select a specific item from a record in the XML file. This .aspx file specifies that the value for the image URL can be obtained from the `<MobileImageSrc>` element of the XML file, and uses a [\<Choice>](https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)) element to select a different image URL if the user's browser requires WML markup.
The `.aspx` file:
[!code-aspx-csharp[MobileAdRotatorSample#1](~/snippets/csharp/VS_Snippets_WebNet/MobileAdRotatorSample/CS/MobileHome.aspx#1)]
[!code-aspx-vb[MobileAdRotatorSample#1](~/snippets/visualbasic/VS_Snippets_WebNet/MobileAdRotatorSample/VB/MobileHome.aspx#1)]
The sample `ads.xml` file (which must be located in the **App_Data** folder):
[!code-xml[MobileAdRotatorSample#2](~/snippets/common/VS_Snippets_WebNet/MobileAdRotatorSample/Common/ads.xml#2)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.AdRotator" />
<altmember cref="P:System.Web.UI.MobileControls.AdRotator.ImageKey" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/dotnet/netframework-3.0/0x3wcsew(v=vs.85)">Introduction to the AdRotator Control</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)"><Choice> Element</related>
</Docs>
</Member>
<Member MemberName="KeywordFilter">
<MemberSignature Language="C#" Value="public string KeywordFilter { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string KeywordFilter" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.MobileControls.AdRotator.KeywordFilter" />
<MemberSignature Language="VB.NET" Value="Public Property KeywordFilter As String" />
<MemberSignature Language="F#" Value="member this.KeywordFilter : string with get, set" Usage="System.Web.UI.MobileControls.AdRotator.KeywordFilter" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ KeywordFilter { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Bindable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Bindable(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue("")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue("")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a category keyword that you can use to filter advertisements from an advertisement file. The default is an empty string (""). This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>.</summary>
<value>The keyword used to identify advertisements within a specific category.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the <xref:System.Web.UI.MobileControls.AdRotator.AdvertisementFile%2A> property has data and this <xref:System.Web.UI.MobileControls.AdRotator.KeywordFilter%2A> property has content, the <xref:System.Web.UI.MobileControls.AdRotator> control selects an advertisement with a matching keyword.
If the <xref:System.Web.UI.MobileControls.AdRotator.AdvertisementFile%2A> property has data and this <xref:System.Web.UI.MobileControls.AdRotator.KeywordFilter%2A> property has content but there is no keyword match between this property and the file, a blank image displays and a trace warning is generated.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.MobileControls.AdRotator.KeywordFilter%2A> property to set the preference from a collection of images in the file referred by the <xref:System.Web.UI.MobileControls.AdRotator.AdvertisementFile%2A> property. For the complete sample code, see the <xref:System.Web.UI.MobileControls.AdRotator> class overview.
[!code-aspx-csharp[MobileAdRotatorSample#4](~/snippets/csharp/VS_Snippets_WebNet/MobileAdRotatorSample/CS/MobileHome.aspx#4)]
[!code-aspx-vb[MobileAdRotatorSample#4](~/snippets/visualbasic/VS_Snippets_WebNet/MobileAdRotatorSample/VB/MobileHome.aspx#4)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.AdRotator" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/dotnet/netframework-3.0/0x3wcsew(v=vs.85)">Introduction to the AdRotator Control</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)"><Choice> Element</related>
</Docs>
</Member>
<Member MemberName="NavigateUrlKey">
<MemberSignature Language="C#" Value="public string NavigateUrlKey { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string NavigateUrlKey" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.MobileControls.AdRotator.NavigateUrlKey" />
<MemberSignature Language="VB.NET" Value="Public Property NavigateUrlKey As String" />
<MemberSignature Language="F#" Value="member this.NavigateUrlKey : string with get, set" Usage="System.Web.UI.MobileControls.AdRotator.NavigateUrlKey" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ NavigateUrlKey { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Bindable(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Bindable(true)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue("NavigateUrl")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue("NavigateUrl")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the name of the element that contains the target URL. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>.</summary>
<value>The name of the element in the XML file that contains the target URL.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use [\<Choice>](https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)) elements to override this setting to show alternate URLs for the advertisement.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.MobileControls.AdRotator.NavigateUrlKey%2A> property to set the target URL for the advertisement. For the complete sample code, see the <xref:System.Web.UI.MobileControls.AdRotator> class overview.
[!code-aspx-csharp[MobileAdRotatorSample#4](~/snippets/csharp/VS_Snippets_WebNet/MobileAdRotatorSample/CS/MobileHome.aspx#4)]
[!code-aspx-vb[MobileAdRotatorSample#4](~/snippets/visualbasic/VS_Snippets_WebNet/MobileAdRotatorSample/VB/MobileHome.aspx#4)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.AdRotator" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/dotnet/netframework-3.0/0x3wcsew(v=vs.85)">Introduction to the AdRotator Control</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/3tfbhf6f(v=vs.100)"><Choice> Element</related>
</Docs>
</Member>
<Member MemberName="OnAdCreated">
<MemberSignature Language="C#" Value="protected virtual void OnAdCreated (System.Web.UI.WebControls.AdCreatedEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnAdCreated(class System.Web.UI.WebControls.AdCreatedEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.MobileControls.AdRotator.OnAdCreated(System.Web.UI.WebControls.AdCreatedEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnAdCreated (e As AdCreatedEventArgs)" />
<MemberSignature Language="F#" Value="abstract member OnAdCreated : System.Web.UI.WebControls.AdCreatedEventArgs -> unit
override this.OnAdCreated : System.Web.UI.WebControls.AdCreatedEventArgs -> unit" Usage="adRotator.OnAdCreated e" />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual void OnAdCreated(System::Web::UI::WebControls::AdCreatedEventArgs ^ e);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.AdCreatedEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.AdCreatedEventArgs" /> object that contains event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.MobileControls.AdRotator.AdCreated" /> event for the <see cref="T:System.Web.UI.MobileControls.AdRotator" /> control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Inheriting classes can override this method to perform other tasks. For example, you can use other criteria to filter how an advertisement is chosen by the <xref:System.Web.UI.MobileControls.AdRotator> control, or you can record the advertisement for billing purposes.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.AdRotator" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/dotnet/netframework-3.0/0x3wcsew(v=vs.85)">Introduction to the AdRotator Control</related>
</Docs>
</Member>
<Member MemberName="Render">
<MemberSignature Language="C#" Value="protected override void Render (System.Web.UI.HtmlTextWriter writer);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Render(class System.Web.UI.HtmlTextWriter writer) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.MobileControls.AdRotator.Render(System.Web.UI.HtmlTextWriter)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub Render (writer As HtmlTextWriter)" />
<MemberSignature Language="F#" Value="override this.Render : System.Web.UI.HtmlTextWriter -> unit" Usage="adRotator.Render writer" />
<MemberSignature Language="C++ CLI" Value="protected:
 override void Render(System::Web::UI::HtmlTextWriter ^ writer);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Mobile</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.Web.UI.HtmlTextWriter" />
</Parameters>
<Docs>
<param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> object that contains the output stream to render.</param>
<summary>Renders the control on the client. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>. This API is obsolete. For information about how to develop ASP.NET mobile applications, see <see href="https://learn.microsoft.com/aspnet/mobile/overview">Mobile Apps & Sites with ASP.NET</see>.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>