|
 |
aspx thread: Problem with 2 buttons and one validator
Message #1 by =?iso-8859-1?Q?Jo=E3o?= Pedro Martins <jota@c...> on Fri, 10 May 2002 18:53:54 +0100
|
|
My problem:
I have 2 diferent behaviours in the page:
- do a query (with several pulldowns and a
text box for a textual search criterium)
- subscribe a mailing list (with a text
box to insert an email)
each of these has its own "ok" button, with its own
server-side event-handler. The text box for
the email has a regexp validator.
Problem:
When I click the _Query's_ "Ok" button, my validator
gets called (client-side) and tells me the email is invalid.
How can I go around this, keeping the client-side
validation?
Thanks in advance,
jo=E3o martins
--
Jo=E3o Pedro Martins
jota@c...
|create|it|
http://www.create.pt
http://www.usabilidade.com
Message #2 by "Minh T. Nguyen" <nguyentriminh@y...> on Fri, 10 May 2002 10:59:43 -0700
|
|
Hi there,
Set the CausesValidation attribute on your Query button to
"false", as in <asp:Button ... CausesValidation=3D"false" >
Good luck,
Minh.
-----Original Message-----
From: Jo=E3o Pedro Martins [mailto:jota@c...]
Sent: Friday, May 10, 2002 10:54 AM
To: ASP+
Subject: [aspx] Problem with 2 buttons and one validator
My problem:
I have 2 diferent behaviours in the page:
- do a query (with several pulldowns and a
text box for a textual search criterium)
- subscribe a mailing list (with a text
box to insert an email)
each of these has its own "ok" button, with its own
server-side event-handler. The text box for
the email has a regexp validator.
Problem:
When I click the _Query's_ "Ok" button, my validator
gets called (client-side) and tells me the email is invalid.
How can I go around this, keeping the client-side
validation?
Thanks in advance,
jo=E3o martins
--
Jo=E3o Pedro Martins
jota@c...
|create|it|
http://www.create.pt
http://www.usabilidade.com
Message #3 by Feduke Cntr Charles R <FedukeCR@m...> on Fri, 10 May 2002 14:14:37 -0400
|
|
Joao,
You should break your form out into two different forms (on the same
page) or use Minh's "CausesValidation". I don't even think ASP.NET will
permit multiple forms for a single page, but then again I've never tried.
If you have two different functions, then you want two different modules (in
ASP.NET's case, pages). So although the interface could offer up 7
different options, if the options are different (i.e. search and subscribe)
you should have 7 different pages to post to, not the same page (and having
multiple
HTH,
- Chuck
-----Original Message-----
From: Joao Pedro Martins [mailto:jota@c...]
Sent: Friday, May 10, 2002 1:54 PM
To: ASP+
Subject: [aspx] Problem with 2 buttons and one validator
My problem:
I have 2 diferent behaviours in the page:
- do a query (with several pulldowns and a
text box for a textual search criterium)
- subscribe a mailing list (with a text
box to insert an email)
each of these has its own "ok" button, with its own
server-side event-handler. The text box for
the email has a regexp validator.
Problem:
When I click the _Query's_ "Ok" button, my validator
gets called (client-side) and tells me the email is invalid.
How can I go around this, keeping the client-side
validation?
Thanks in advance,
joao martins
--
Joao Pedro Martins
jota@c...
|create|it|
http://www.create.pt
http://www.usabilidade.com
|
|
 |