Dynamic calculation using databinding and Autopostback property

J

jagdishl

Hi:
I have a form in which the total is calculated dynamically(without
using a submit button) based on the inputs given in the text box
fields.
I had bound the total textbox control using the custom binding
expression


system.convert.toDouble(txt0to30dayscosts) +
system.convert.toDouble(txt31to60costs) +
system.convert.toDouble(txt61to90costs) +
system.convert.toDouble(txt91to120costs) +
system.convert.toDouble(txt120daysovercosts) +
system.convert.toDouble(txtprecosts)


I had also set the Autopostback property "True" for each of these
textbox controls.Yet this does not seem to work,I would really
appreciate if someone would help me on this.
Thanks
 
N

Nilesh Deshpande

Jagdish,

First, where is this code located. You have to put it in TextChanged event
handler function for each textbox.

Second, TextChanged event will on raise when focus moves out of the textbox
control.

The better way to do is write JavaScript code to update Total on the client
side without having to postback.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top