Share via


AdControl.Refresh Method

Definition

Directs the AdControl to show the next ad when a new one becomes available, if auto-refresh is disabled. The currently rendered ad remains until the next ad becomes available.

public:
 void Refresh();
/// [Windows.Foundation.Metadata.Overload("Refresh1")]
void Refresh();
[Windows.Foundation.Metadata.Overload("Refresh1")]
public void Refresh();
function refresh()
Public Sub Refresh ()
Attributes

Exceptions

The <xref:Microsoft.Advertising.WinRT.UI.AdControl.IsAutoRefreshEnabled?text=IsAutoRefreshEnabled> property is set to true.

Remarks

The normal refresh interval is 60 seconds. IsAutoRefreshEnabled must be set to false before calling Refresh.

If no ad or no new ad is shown:

  • The network may be unavailable.
  • An error may have occurred when trying to contact the ad server.
  • The ad unit may be configured in Partner Center so that it excludes any available inventory of ads. Try eliminating keywords or other ad-targeting restrictions.
  • Refresh has been called too soon after the previous call. The normal refresh interval is 60 seconds. No new ad will be shown if the attempt to refresh is made during this time.

Applies to