Gets the direct URL of the Tag specified by the category and Tag names. Following the direct URL in a Web browser is equivalent to scanning the Tag. Each time the direct URL is used in a browser, the Tag's content is shown, and a scan is logged.

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

Syntax

C#
string GetDirectUrl(
	UserCredential userCredential,
	string categoryName,
	string tagName
)
Visual Basic
Function GetDirectUrl ( _
	userCredential As UserCredential, _
	categoryName As String, _
	tagName As String _
) As String
Visual C++
String^ GetDirectUrl(
	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 obtain the direct URL for.
tagName
Type: System..::..String
The name of the Tag to obtain.

Return Value

A string containing the direct URL for the requested tag.

Remarks

Each time the direct URL is used in a browser, the Tag's content is shown, and a scan is logged.

Examples

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

        oCredential.AccessToken = "Enter your access token";
        string directUrl = OMIBPClient.GetDirectUrl(oCredential,
                                                "Category Name",
                                                "Tag Name");
    }
    catch
    {
        throw;
    }
}

See Also