Activates a Tag that has been paused with the PauseTag(UserCredential, String, String) method. A Tag that has been paused is not available until it has been activated.

Namespace: Microsoft.Tag.CampaignManagement
Assembly: Microsoft.Tag.CampaignManagement (in Microsoft.Tag.CampaignManagement.dll) Version: 1.0.7785.0 (1.0.7785.0)

Syntax

C#
bool ActivateTag(
	UserCredential userCredential,
	string categoryName,
	string tagName
)
Visual Basic
Function ActivateTag ( _
	userCredential As UserCredential, _
	categoryName As String, _
	tagName As String _
) As Boolean
Visual C++
bool ActivateTag(
	UserCredential^ userCredential, 
	String^ categoryName, 
	String^ tagName
)

Parameters

userCredential
Type: Microsoft.Tag.CampaignManagement..::..UserCredential
A 64-bit encrypted GUID specifying the user credential.
categoryName
Type: System..::..String
The name of the Category containing the Tag to be activated.
tagName
Type: System..::..String
The name of the Tag to be activated.

Return Value

true if the method succeeds

false if the method fails

Remarks

ActivateTag allows you to activate a Tag after it has been paused, making it available for use.

ActivateTag fails when any of the following invalid parameters is passed:

  • Category not found.
  • Category has an invalid status.
  • Category is paused.
  • Tag has duplicate name.
  • Tag not found.
  • Tag status is invalid.
  • Tag is paused.
  • Tag has dates lie outside the bounds of the containing Category's dates.
  • Tag has dates which conflict (e.g. the Start Date is after the End Date).

Examples

This code sample shows how to call ActivateTag(UserCredential, String, String).
CopyC#
private void LocalActivateTag()
{
    try
    {
        MIBPContractClient OMIBPClient = new MIBPContractClient();
        UserCredential oCredential = new UserCredential();

        oCredential.AccessToken = "Enter your access token";

        OMIBPClient.ActivateTag(oCredential, "Category Name", "Tag Title");

    }
    catch
    {
        throw;
    }
}

See Also