Export (0) Print
Expand All

AdUnitId Property - Windows 8.0

Microsoft Advertising Services

Updated: August 2, 2013

Published: June 4, 2013

Gets or sets the ad unit identifier for this AdControl instance. This value is provided to the publisher in Microsoft pubCenter as part of the publisher’s ad unit creation and configuration process.

Namespace: Microsoft.Advertising.WinRT.UI (in Microsoft.Advertising.WinRT.UI.winmd)

JavaScript Library: ad.js

Syntax

C#

public string AdUnitId { get; set; }

JavaScript

var adunitid = adControl.adUnitId;

adControl.adUnitId = adunitid;

Property Value

Language

Property

Type

Return Type

C#

AdUnitId

string

string

JavaScript

adUnitId

String

String

This property can be set only when the AdControl is instantiated. Once set, this property cannot be modified.

If you assign a new value to the AdUnitId, the assignment will work and the property value will change without throwing an exception. However, on the next ad refresh the errorOccurred event will fire indicating that the value cannot be changed.

Support and Feedback

Get product support or report a bug in the advertising SDK by visiting the Windows 8 Dev Center support page (scroll down to the section "Microsoft Advertising support").

Send feedback about this documentation to adsfdbk@microsoft.com. There is no product support through this alias. Documentation feedback only.

Community Additions

ADD
Show:
© 2014 Microsoft