topical media & game development

talk show tell print

basic-xml-15-listing1.txt / txt



  Response.ContentType = "text/xml"
  
  Dim quantity, unitPrice
  Dim discount, extPrice
  
  On Error Resume Next
  
  quantity = Request.QueryString.Item("quantity")
  unitPrice = Request.QueryString.Item("unitPrice")
  
  discount = QuantityDiscount(quantity)
  extPrice = (CDbl(quantity) * CDbl(unitPrice))*(1 - (discount/100))
  
  If Err.number <> 0 Then
     Response.Write (ErrorXML())
  Else
     Response.Write (SuccessXML(discount, extPrice))
  End If
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.