DeanCovey
Posts: 22
|
| Posted: 02/17/2007, 8:11 PM |
|

Does anyone know how to use ccAddParam() function? What is the query string? If I know the parameter name and value I want to add to my URL then why do I need the query?
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 02/18/2007, 10:37 AM |
|
Sometimes you want this to be controlled in code.
For example:
if EventCaller.ItemID.Value = "*Comment*" then
EventCaller.TypeImg.Value = "c.png"
EventCaller.TypeImg.Page = "UpdateQuoteComment.asp"
EventCaller.TypeImg.Parameters =
CCAddParam(EventCaller.TypeImg.Parameters, "QuoteDetailKeyID",
EventCaller.Recordset.Fields("QuoteDetailKeyID"))
EventCaller.TypeImg.Parameters =
CCAddParam(EventCaller.TypeImg.Parameters, "t", Timer())
EventCaller.Quantity.Value = ""
EventCaller.ManufacturerListPrice.Value = ""
EventCaller.SellingPrice.Value = ""
EventCaller.TotalSellingPrice.Value = ""
EventCaller.Cost.Value = ""
else
EventCaller.TypeImg.value = lcase(EventCaller.TypeImg.Value) & ".png"
EventCaller.TypeImg.Page = "UpdateQuoteLineDetail.asp"
EventCaller.TypeImg.Parameters =
CCAddParam(EventCaller.TypeImg.Parameters, "QuoteDetailKeyID",
EventCaller.Recordset.Fields("QuoteDetailKeyID"))
EventCaller.TypeImg.Parameters =
CCAddParam(EventCaller.TypeImg.Parameters, "t", Timer())
end if
Another scenario is to dynamically modify a redirect based on the outcome of
a form operation:
Function tblAccounts_AfterInsert() 'tblAccounts_AfterInsert @4-2FC50228
'Custom Code @85-73254650
' -------------------------
' Write your own code here.
' -------------------------
Dim MyQueryString
MyQueryString = Request.QueryString
MyQueryString = CCRemoveParam(MyQueryString,"ccsForm")
If NextAccountNumber > 0 Then
Response.Redirect "AccountView.asp?" & CCAddParam(MyQueryString,
"AccountNumber", NextAccountNumber)
end if
'End Custom Code
End Function 'Close tblAccounts_AfterInsert @4-54C34B28
In the case above, a stored procedure is called to insert a new account
record. If it fails, it returns 0, otherwise the new account number. If
the record was successfully added, we want to remain on the same record, but
now in edit mode instead of insert mode - so we must pass the new account
number to the form.
"DeanCovey" <DeanCovey@forum.codecharge> wrote in message
news:645d7d1e3eb11f@news.codecharge.com...
> 
>
> Does anyone know how to use ccAddParam() function? What is the query
> string?
> If I know the parameter name and value I want to add to my URL then why do
> I
> need the query?
>
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|