I loved the MSCSPage object... it never came out anywhere else despite it's
awesome capabilities. The Page.URL method was good also and I have
developed my own version of it. Those of you that have never come across
this ASP component from Microsoft have missed out.
Function PageOption(vValue, vSelected, vText)
Dim strTemp
strTemp = "<option value=""" & vValue & """"
If vValue = vSelected Then
strTemp = strTemp & " selected"
End If
PageOption = strTemp & ">" & Server.HTMLEncode(vText) & "</option>"
End Function
Function PageCheck(vTest)
If vTest Then
PageCheck = " checked"
Else
PageCheck = vbNullString
End If
End Function
Function PageURL(pageName, arrURLArgs)
Dim i, stURL
stURL = Application("HostURL") & Application("VDir") & pageName
If IsArray(arrURLArgs) Then
For i = 0 To UBound(arrURLArgs, 1)
If i Mod 2 = 0 Then
If i = 0 Then
stURL = stURL & "?" & arrURLArgs(i)
Else
stURL = stURL & "&" & arrURLArgs(i)
End If
Else
stURL = stURL & "=" & Server.URLEncode(arrURLArgs(i))
End If
Next
End If
PageURL = stURL
End Function
Function PageMoney(ByVal vMonetaryAmount)
If Not IsNumeric(vMonetaryAmount) Then
vMonetaryAmount = 0
End If
vMonetaryAmount = CCur(vMonetaryAmount)
vMonetaryAmount = vMonetaryAmount / 100
PageMoney = FormatCurrency(vMonetaryAmount, 2, True, False, True)
End Function
"Christian Perthen" <ab**********@dontreplytothisaddress.com> wrote in
message news:O1**************@TK2MSFTNGP03.phx.gbl...
Hi,
I am seeking an alternative component for MS Commerce Servers page object.
Mostly used for creating and retrieving URLs
Exemple,
Dim strVar
strVar = mscspage.requeststring("strVar", null)
Dim intVar
intVar = mscspage.requestnumber("intVar", 0)
and
<a href="<%="default.asp?" & mscspage.URLargs("strVar", strVar, "intVar",
intVar)%>">example</a>
Does anyone know if any similar components that can do something like
above.
Thanks in advance
Christian