I have a logon page that asks for a Logon and Password as well as a
linkbutton that goes to register a new user.
The problem is that if I push the submit button or the linkbutton to
register a new user, it jumps to the validation routine before anything
else. If a user fills in an email and password and then decides to press
the linkbutton to register, it will validate the logon and password and then
go to the register new user page.
Is there a way to prevent the the validation routine to not run or to only
have the submit button jump to the validation function?
Here is my RequiredFieldVa lidator:
<asp:RequiredFi eldValidator
ControlToValida te="txtPassword "
Text="You must enter an password"
runat="server" />
<asp:CustomVali dator
ControlToValida te="txtEmail"
OnServerVAlidat e="ValidateEmai l"
Display="Dynami c"
Text="Not Valid !"
runat="server" />
and my ValidateEmail starts out as:
Sub ValidateEmail(s as Object,e as ServerValidateE ventArgs)
Thanks,
Tom 3 1327
If you set the CausesValidatio n property of the control, (in this case your
linkbutton) to False, it won't trigger the RequiredFieldVa lidator. It is set
to True by default.
"tshad" wrote: I have a logon page that asks for a Logon and Password as well as a linkbutton that goes to register a new user.
The problem is that if I push the submit button or the linkbutton to register a new user, it jumps to the validation routine before anything else. If a user fills in an email and password and then decides to press the linkbutton to register, it will validate the logon and password and then go to the register new user page.
Is there a way to prevent the the validation routine to not run or to only have the submit button jump to the validation function?
Here is my RequiredFieldVa lidator:
<asp:RequiredFi eldValidator ControlToValida te="txtPassword " Text="You must enter an password" runat="server" /> <asp:CustomVali dator ControlToValida te="txtEmail" OnServerVAlidat e="ValidateEmai l" Display="Dynami c" Text="Not Valid !" runat="server" />
and my ValidateEmail starts out as:
Sub ValidateEmail(s as Object,e as ServerValidateE ventArgs)
Thanks,
Tom
"Richard" <Ri*****@discus sions.microsoft .com> wrote in message
news:15******** *************** ***********@mic rosoft.com... If you set the CausesValidatio n property of the control, (in this case your linkbutton) to False, it won't trigger the RequiredFieldVa lidator. It is set to True by default.
Perfect.
Thanks,
Tom "tshad" wrote:
I have a logon page that asks for a Logon and Password as well as a linkbutton that goes to register a new user.
The problem is that if I push the submit button or the linkbutton to register a new user, it jumps to the validation routine before anything else. If a user fills in an email and password and then decides to press the linkbutton to register, it will validate the logon and password and then go to the register new user page.
Is there a way to prevent the the validation routine to not run or to only have the submit button jump to the validation function?
Here is my RequiredFieldVa lidator:
<asp:RequiredFi eldValidator ControlToValida te="txtPassword " Text="You must enter an password" runat="server" /> <asp:CustomVali dator ControlToValida te="txtEmail" OnServerVAlidat e="ValidateEmai l" Display="Dynami c" Text="Not Valid !" runat="server" />
and my ValidateEmail starts out as:
Sub ValidateEmail(s as Object,e as ServerValidateE ventArgs)
Thanks,
Tom This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Robb Meade |
last post by:
Hi all,
A recent project that I had finished and went live with no apparant
problems.
My client received an email from a user who mentioned that by accident they
had been typing (over the querystring I guess), and the url had become
default.asp?pageid='asd
|
by: bregent |
last post by:
I've seen plenty of articles and utilities for preventing form injections for
ASP.NET, but not too much for classic ASP. Are there any good input validation
scripts that you use to avoid form injection attacks? I'm looking for good
routines I can reuse on all of my form processing pages. Thanks.
|
by: kbrolin65 |
last post by:
Hi, folks. Please be patient, as I am not a programmer. But I wasn't
sure where to turn for advice except for a programming discussion
group. I am an intermediate PC user--fairly knowledgeable, but with a
problem that even Web site technical support hasn't been able to solve.
Here's a problem I've never encountered before wwithout a
popup-blocker: inability to connect to Streamaudio.com , a multimedia
site with links to live radio...
|
by: AD |
last post by:
Hi,
I have 2 different web pages, both using RequiredFieldValidator's, on
the one page Postbacks are prevented when required fields are blank,
on the other page the validators display the error messages after the
postback has returned, but neither the client side, nor the server
side processing is suppressed (my incomplete data is written to my
table)
Any idea what could be wrong?
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |