CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Does anyone know how to use CCAddParam?

Print topic Send  topic

Author Message
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?

View profile  Send private message
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/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.