BuildUrl Method (String, Boolean, String, String, String, String, String, String, String, String)
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
(Obsolete) Use this method to generate an encoded URL string, with four names and four values.
Namespace: Microsoft.CommerceServer.Runtime
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Function BuildUrl ( _
fileName As String, _
secure As Boolean, _
urlParameterName As String, _
urlParameterValue As String, _
urlParameterName2 As String, _
urlParameterValue2 As String, _
urlParameterName3 As String, _
urlParameterValue3 As String, _
urlParameterName4 As String, _
urlParameterValue4 As String _
) As String
'Usage
Dim instance As QueryStringBuilder
Dim fileName As String
Dim secure As Boolean
Dim urlParameterName As String
Dim urlParameterValue As String
Dim urlParameterName2 As String
Dim urlParameterValue2 As String
Dim urlParameterName3 As String
Dim urlParameterValue3 As String
Dim urlParameterName4 As String
Dim urlParameterValue4 As String
Dim returnValue As String
returnValue = instance.BuildUrl(fileName, _
secure, urlParameterName, urlParameterValue, _
urlParameterName2, urlParameterValue2, _
urlParameterName3, urlParameterValue3, _
urlParameterName4, urlParameterValue4)
public string BuildUrl(
string fileName,
bool secure,
string urlParameterName,
string urlParameterValue,
string urlParameterName2,
string urlParameterValue2,
string urlParameterName3,
string urlParameterValue3,
string urlParameterName4,
string urlParameterValue4
)
public:
String^ BuildUrl(
String^ fileName,
bool secure,
String^ urlParameterName,
String^ urlParameterValue,
String^ urlParameterName2,
String^ urlParameterValue2,
String^ urlParameterName3,
String^ urlParameterValue3,
String^ urlParameterName4,
String^ urlParameterValue4
)
public function BuildUrl(
fileName : String,
secure : boolean,
urlParameterName : String,
urlParameterValue : String,
urlParameterName2 : String,
urlParameterValue2 : String,
urlParameterName3 : String,
urlParameterValue3 : String,
urlParameterName4 : String,
urlParameterValue4 : String
) : String
Parameters
- fileName
Type: System..::.String
- secure
Type: System..::.Boolean
The secure flag, set to true for https and false for http. Https will be used for the URL if this flag is true and the site is enabled for https.
- urlParameterName
Type: System..::.String
Name of the first property.
- urlParameterValue
Type: System..::.String
Value of the first property.
- urlParameterName2
Type: System..::.String
Name of the second property. .
- urlParameterValue2
Type: System..::.String
Value of the second property.
- urlParameterName3
Type: System..::.String
Name of the third property.
- urlParameterValue3
Type: System..::.String
Value of the third property.
- urlParameterName4
Type: System..::.String
Name of the fourth property.
- urlParameterValue4
Type: System..::.String
Value of the fourth property.
Return Value
Type: System..::.String
The encoded URL string.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | urlParameterName, urlParameterName2, urlParameterName3 or or urlParameterName4is nullNothingnullptra null reference (Nothing in Visual Basic). |
CommerceAuthenticationException | The URL could not be obtained. |
Remarks
You have to use the BuildUrl method every time you want to append the ticket to the URL in a cookieless scenario. If this is not done, the ticket will not be passed on to the next request. If filename is not nullNothingnullptra null reference (Nothing in Visual Basic), the COM method AuthManager.GetURL is called. If filename is nullNothingnullptra null reference (Nothing in Visual Basic), and if the CookieSupport property is set to true, then the AuthManager.UrlShopperArgs COM method is called. If filename is nullNothingnullptra null reference (Nothing in Visual Basic) and the CookieSupport property is set to false, then AuthManager.UrlArgs COM method is called.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.