|
-
May 8th, 2003, 12:07 PM
#1
Thread Starter
PowerPoster
Required Field Validatior Question
This may be easy, but I must be overlooking the obvious.
I have two command buttons on the web form, with 4 textbox's.
When I click the first button, I submit the values of the first two textbox's. When I click the second button, I submit the values of the last two textbox's.
Here's the problem. I'm using required field validators and I need each button to only validate its related two textbox's, where now I checks all controls on the form. Any ideas?
-
May 8th, 2003, 04:25 PM
#2
Hyperactive Member
I don't use validators (is that bad?) .. But I validate them myself in VB code, and I have a label on the page (lblError)... and if something required is not filled out, i make the lblError visible and set its Text property to the error message.
-
May 8th, 2003, 04:28 PM
#3
Thread Starter
PowerPoster
Using the required field validators, you have the option to do all of your validation on the client-side, thus avoiding the nasty roundtrip. I may just have to write my own javascript.
-
May 9th, 2003, 02:04 PM
#4
Hyperactive Member
You could always use a couple of custom validators.
Associate the first with button A to validate boxes 1 & 2 and associate the other with button B to validate boxes 3 & 4.
Bear in mind that the client-side validation isn't supported by all browsers...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|