Well you could use a number of client-side approaches. You could make a
custom validator with the javascript that you provide implementing the
logic for your page (totaling, showing balance, etc.)... and only when
the amounts are right, will your page postback.
- Vaibhav
netasp wrote:
Quote:
hi all,
I need your help with the following scenario:
I am using VS 2005 and SQL server DB, my form has 3 textboxes
>
txtTotalAmount, txtAmountEntered, txtAmountBalance. If txtTotalAmount is
$20.00 for example then user can enter $2.00 in cash, $2.00 in MasterCard,
$16.00 in Cash ,..etc until total amount is reached then balance will show
to user.
>
I just don't know whats the best way to approach this? store everything in
public variables? public properties? Datatable fields? what is the most
effecient and less overhead call (best practice)?
If user enters the proper amount, then its an easy formula, but when you
have
multiple payments (ex: $5 in cash, $5 in Interac, $5 in visa and $20 in
cash - here is the problem!) the LAST $20 in cash is actually ONLY
$5.00(toward the balance)
that must be added to the cash value for that transaction and $15.00 must be
returned to the customer.
>
does anyone have a solution for this scenario?
>
thanks alot