473,385 Members | 1,356 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,385 software developers and data experts.

Web Form with 2 different validation points

I have a Webform that contains 2 user controls, each one of them has some
fields in which the user can type different information, each one allows to
submit, BUT, haw can i manage to validate each form, if I set any of the two
submit buttons to "CauseValidation" they will perform validation on the 2
forms not just in the one the pressed the submit button on.

TIA!
Nov 19 '05 #1
2 883
TCORDON,

One way to get you over the line would be:
set up a hidden field on your form,
add some javascript to update this field from both user controls' buttons to
say 1 or 2,
then on Page_Load event disable validation for the other user control (you
may want to disable your validators on Client as well - just use enabled
property).

This way only the required validation will be triggered.

"TCORDON" wrote:
I have a Webform that contains 2 user controls, each one of them has some
fields in which the user can type different information, each one allows to
submit, BUT, haw can i manage to validate each form, if I set any of the two
submit buttons to "CauseValidation" they will perform validation on the 2
forms not just in the one the pressed the submit button on.

TIA!

Nov 19 '05 #2
Please see the topic "Several buttons associated with their own validators"
in this article: http://aspalliance.com/699.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"TCORDON" <tc******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I have a Webform that contains 2 user controls, each one of them has some
fields in which the user can type different information, each one allows to
submit, BUT, haw can i manage to validate each form, if I set any of the
two submit buttons to "CauseValidation" they will perform validation on the
2 forms not just in the one the pressed the submit button on.

TIA!

Nov 19 '05 #3

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

Similar topics

1
by: Florian Peer | last post by:
Hello! I am trying to set up an form, which at the end makes a vacation package. It has a certain amount of pages, depending on what the client wants. I would like to read some background...
21
by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email...
72
by: Stephen Poley | last post by:
I have quite often (as have probably many of you) come across HTML forms with irritating bits of Javascript attached. The last straw on this particular camel's back was a large form I was asked to...
3
by: Skippytpe | last post by:
Does anyone have an idea why the form validation in the following page wouldn't be working? I had been using XHTML 1.0 transitional which allowed me to use the form attribute 'name.' I could then...
5
by: billa | last post by:
I wish to carry out standard form validation (i.e. is it a date?, is there a value in the field, is it a number) using the onBlur event rather than the onSubmit event. This (of course) leads to...
9
by: julie.siebel | last post by:
Hello all! As embarrassing as it is to admit this, I've been designing db driven websites using javascript and vbscript for about 6-7 years now, and I am *horrible* at form validation. To be...
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
11
by: Rik | last post by:
Hello guys, now that I'm that I'm working on my first major 'open' forms (with uncontrolled users I mean, not a secure backend-interface), I'd like to add a lot of possibilities to check wether...
7
ak1dnar
by: ak1dnar | last post by:
Hi, I got this scripts from this URL There is Error when i submit the form. Line: 54 Error: 'document.getElementbyID(....)' is null or not an object What is this error. Complete Files
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.