Share via


AuthManager.URLArgs Method (PIA)

Use this method to generate a Uniform Resource Locator (URL) encoded query string of name/value pairs.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop
…
Public Function URLArgs(ByRefpVarURLParameters As Object,
  ByRef pVarURLValues As Object) As String

[C#]

using Microsoft.CommerceServer.Interop;
…
string URLArgs(refobjectoURLParameters,
  refobjectoURLValues);

Parameters

[Visual Basic .NET]

  • pVarURLParameters
    A System.Array that contains the parameter names.
  • pVarURLValues
    A System.Array that contains the values corresponding to the parameter names.

[C#]

  • pURLParameters
    An object containing a System.Array of parameter names.
  • pURLValues
    An object containing a System.Array of parameter values corresponding to the parameter names.

Return Values

This method returns a string that contains the resulting encoded URL query string.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

[Visual Basic .NET]

The following table shows the custom COM errors that this method can return.

Value Description
&HC1004C24 This method should only be called within an ASP page.
&HC1004C10 The Initialize method must be called with the installed site name before calling this method.

[C#]

The following table shows the custom COM errors that a COMException can wrap.

Value Description
0xC1004C24 This method should only be called within an ASP page.
0xC1004C10 The Initialize method must be called with the installed site name before calling this method.

Remarks

This method concatenates the parameter name/value pairs into a encoded URL string. This method will fail if the two arrays containing the parameter names and values are not the same size.

The URLShopperArgs method performs the same URL encoding and additionally appends the ticket to the query string, if a ticket is set.

[C#]

The returned string contains valid data only if the method completes successfully.

[Visual Basic .NET]

Example

' saParameterNames and saParameterValues are SafeArrays
' sURLArg is a string
' oAuthManager is a Commerce AuthManager object

saParameterNames(0) = "sku1"
saParameterNames(1) = "sku3"
saParameterValues(0) = "12345"
saParameterValues(1) = "98765"
sURLArg = oAuthManager.URLArgs(saParameterNames, saParameterValues)

' sURLArg = "?sku1=12345&sku3=98765"

Requirements

Namespace: Microsoft.CommerceServer.Interop

Platforms: Windows 2000, Windows Server 2003

Assembly: mscsauthlib (in mscsauthlib.dll)

See Also

AuthManager Class

AuthManager.URLShopperArgs

Copyright © 2005 Microsoft Corporation.
All rights reserved.