WaveRebel
|
| Posted: 10/24/2002, 6:01 AM |
|
Hi, (using ASP)
Im working on a Backoffice and i need to add some custom code to a Label in the Grid.
I dont know what to use in the custom code section.
Here's what i have.
----------------------------------------
dim producttotal
producttotal = ordprod_qty * prod_price
----------------------------------------
This code will give me the total $ of products. But as custom code has its own ASP page it doenst contain the connection string neither the sql string. Im only asking if you guys know a way of using CCS code instead of making my own connection and my own sql string.
Thanks
|
|
|
 |
WaveRebel
|
| Posted: 10/24/2002, 11:04 AM |
|
Well after a few hours trying to find out how it works i actually founf out how to do it.
Before Show Code
'Custom Code @
' -------------------------
OrderProducts.producttotal.Value = OrderProducts.Recordset.Fields("ordprod_qty") * OrderProducts.Recordset.Fields("prod_price")
' -------------------------
'End Custom Code
Here are the main vars:
OrderProducts = Form or Grid Name
ordprod_qty = Quantity of products on Database
prod_price = Price of the product
Easy! This will multiply the amount of products in your basket by the price and give you a total in the label <producttotal> :D
|
|
|
 |
|