Autopostback field with a check.

  • Thread starter Thread starter Mufasa
  • Start date Start date
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.
 
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?
 
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.
 
Back
Top