Autopostback field with a check.

M

Mufasa

I have a page where there's some math being done between a couple of fields.
They are autopostback so essentially it won't let them go on if certain
conditions aren't met. If the person tabs out of one of the fields I do the
checks and if they pass I move to the next field. But if don't I want it to
stay on the field.

I've got all that working except if somebody enters a value and then clicks
a different field, since I don't know what the field is they clicked on, it
just moves to the next field on the screen which is annoying.

I've seen the CompateValidator but that only can compare one field to
another field. I'm actually going to have to do some math before the
compare.

Anybody have any suggestions?

TIA - Jeff.
 
A

Aamir Ghanchi

I have a page where there's some math being done between a couple of fields.
They are autopostback so essentially it won't let them go on if certain
conditions aren't met. If the person tabs out of one of the fields I do the
checks and if they pass I move to the next field. But if don't I want it to
stay on the field.

I've got all that working except if somebody enters a value and then clicks
a different field, since I don't know what the field is they clicked on, it
just moves to the next field on the screen which is annoying.

I've seen the CompateValidator but that only can compare one field to
another field. I'm actually going to have to do some math before the
compare.

Anybody have any suggestions?

TIA - Jeff.

Can you handle events like TextChanged, CheckChanged,
SelectedIndexChanged and validate the values in them and of not
correct then refocus back on the control with validation message.
How about using CustomValidator?
 
M

Mufasa

That's essentially what I'm doing. The problem is when the value is valid
and somebody clicks off to another field. I'd like to have tab work so it
moves to the next field or have them be allowed to select a different field
by clicking on it.
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top