auto calculate number

Discussion in 'C#' started by qq2, Dec 16, 2007.

  1. #1
    hi, guys, i'm new here. and new for asp as well. i have a problem with my asp project, hope if anyone can help. thanks a lot ....

    i wanna do text field which auto calculate the amount of other text field. exp.in a super market system, they enter in the unit price and quantity of item1, then system wil show the amount when item1 quantity text field lose foucs , and the unit price and quantity of item2, then the amount will auto calculate the total amount of item1 + item2 and displayed when item2 quantity text field lose foucs

    :confused::confused::confused: thanks a lot
     
    qq2, Dec 16, 2007 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Most the time you would do this with javascript on the client side rather than serverside for the sake of speed and bandwidth. www.dynamicdrive.com will almost certainly have a script to get you 90% of the way there
     
    AstarothSolutions, Dec 17, 2007 IP
  3. CyberMew

    CyberMew Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    can be done, normally such applications are done with vb.net programming, not with asp(.net)

    if you are using vb.net, you can set a event for the textbox(es) when it exit the textbox, calculate xxxx and xxxxx as well as xxxx

    however as mentioned above it will be REALLY wise to use javascript if it is on a website (asp/asp.net). not to mention that it is not possible to detect whether the focus is being lost on the textbox with asp(.net). correct me if i am wrong
     
    CyberMew, Dec 18, 2007 IP