473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Autopostback field with a check.

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.
Oct 2 '07 #1
2 1296
On Oct 2, 1:37 pm, "Mufasa" <j...@nowhere.comwrote:
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?

Oct 2 '07 #2
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.

"Aamir Ghanchi" <aa**********@gmail.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.com...
On Oct 2, 1:37 pm, "Mufasa" <j...@nowhere.comwrote:
>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?

Oct 3 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: LRD | last post by:
Form not refreshing after autopostback unless keyboard or mouse move Hi, We created several new ASP.NET C# forms for our intranet. In each form we use panels for different sections of the...
8
by: Matthew Louden | last post by:
why need to set autopostback property to be true?? I know autopostback event means to send the form to the server automatically. I tried checkbox, checkbox list, radio button, and radio button...
1
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What...
4
by: tshad | last post by:
I am trying to fire the CustomValidator when I leave the Email field. Following is the code. It does PostBack, but the CustomValidator doesn't seem to be firing. <asp:TextBox...
2
by: Tom Edelbrok | last post by:
Question: Why does a button event (ie: Button1_Click) get executed on the first click for a textbox control which has 'autopostback=false', but doesn't get executed until a second click when...
3
by: Brad | last post by:
The first text on my form is a numeric field. I have a javascript that runs on this field for onkeyup (validate the key strokes and modifies fields on the screen) but when I do this and have the...
1
by: pleaseexplaintome | last post by:
I have a datagrid with checkboxes and I can check/uncheck the checkboxes to update a database by calling my oncheckchanged function. I would like to add popup asking the users if they are sure...
2
by: rn5a | last post by:
Assume that a user control has a TextBox (Page1.ascx) <asp:TextBox ID="txtName" runat="server"/> I am encapsulating the above user control in a ASPX page named Page1.aspx i.e. the ASPX page...
1
by: Mufasa | last post by:
I have a couple of fields that are autopostback and I want to make tab work correctly between them. But whenever somebody changes the value and clicks somewhere else the page reloads as it should...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.