Export (0) Print
Expand All

AdUnitId Property - Windows 8.1

Microsoft Advertising Services

Updated: October 17, 2013

Published: April 1, 2014

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 Store Apps developer support page support page. For product support, under "App development" click the "Advertising SDK" link. To post a question in the support forum, scroll down to "Find answers online" and click "Ads-in-Apps for Windows 8 forum".

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