Sorry,
My last post got messed up.
I have a password box that I want to validate for required as well as for
validity. So I have the following:
*************** *************** *************** **
<td align="right">P assword</td>
<td><asp:textbo x id="txtPassword " TextMode="Passw ord" Columns="32"
runat="server" />
<asp:RequiredFi eldValidator
ControlToValida te="txtPassword "
Text="You must enter an password"
Font-Size="10"
runat="server" />
<asp:CustomVali dator
ControlToValida te="txtEmail"
OnServerValidat e="ValidateEmai l"
Font-Size="10"
Display="Dynami c"
Text="Not Valid !"
runat="server" />
</td>
*************** *************** *************** *************** ***
If I put nothing in the field, I get:
You must enter an password Not Valid !
Why is this? I want both validators as I need to make sure something is
entered and get one message and if something is entered, I need a different
message if the password is invalid.
Thanks,
Tom 2 927
Your validators point to different controls with their ControlToValida te
properties.
--- Peter Blum www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at http://www.peterblum.com/vam/home.aspx
"tshad" <ts**********@f tsolutions.com> wrote in message
news:uV******** ******@TK2MSFTN GP15.phx.gbl... Sorry,
My last post got messed up.
I have a password box that I want to validate for required as well as for validity. So I have the following:
*************** *************** *************** ** <td align="right">P assword</td> <td><asp:textbo x id="txtPassword " TextMode="Passw ord" Columns="32" runat="server" /> <asp:RequiredFi eldValidator ControlToValida te="txtPassword " Text="You must enter an password" Font-Size="10" runat="server" /> <asp:CustomVali dator ControlToValida te="txtEmail" OnServerValidat e="ValidateEmai l" Font-Size="10" Display="Dynami c" Text="Not Valid !" runat="server" /> </td> *************** *************** *************** *************** ***
If I put nothing in the field, I get:
You must enter an password Not Valid !
Why is this? I want both validators as I need to make sure something is entered and get one message and if something is entered, I need a different message if the password is invalid.
Thanks,
Tom
"Peter Blum" <PL****@Blum.in fo> wrote in message
news:up******** ******@TK2MSFTN GP15.phx.gbl... Your validators point to different controls with their ControlToValida te properties.
You're right.
I must be blind. When I changed it, it worked fine.
Thanks,
Tom
--- Peter Blum www.PeterBlum.com Email: PL****@PeterBlu m.com Creator of "Profession al Validation And More" at http://www.peterblum.com/vam/home.aspx
"tshad" <ts**********@f tsolutions.com> wrote in message news:uV******** ******@TK2MSFTN GP15.phx.gbl... Sorry,
My last post got messed up.
I have a password box that I want to validate for required as well as for validity. So I have the following:
*************** *************** *************** ** <td align="right">P assword</td> <td><asp:textbo x id="txtPassword " TextMode="Passw ord" Columns="32" runat="server" /> <asp:RequiredFi eldValidator ControlToValida te="txtPassword " Text="You must enter an password" Font-Size="10" runat="server" /> <asp:CustomVali dator ControlToValida te="txtEmail" OnServerValidat e="ValidateEmai l" Font-Size="10" Display="Dynami c" Text="Not Valid !" runat="server" /> </td> *************** *************** *************** *************** ***
If I put nothing in the field, I get:
You must enter an password Not Valid !
Why is this? I want both validators as I need to make sure something is entered and get one message and if something is entered, I need a different message if the password is invalid.
Thanks,
Tom
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: TJS |
last post by:
what are folks doing to get around limitation of one server form per page ?
|
by: Ken Varn |
last post by:
If a page has multiple ValidationSummary controls, how does it distinguish
which ValidationControls are associated with which ValidationSummary
controls?
The reason I am asking this is that I want to display a Message Box for the
validation message on my Validation controls. My validation control is
embedded within a custom server control. If my custom server control adds a
ValidationSummary control, I am afraid that it may conflict...
|
by: epigram |
last post by:
I'm trying to use the ASP.NET validators to check some client-side business
rules. I've got two ASP TextBox controls (call them tbxYear1 and tbxYear2)
used to enter a range of years. I've got a couple things I need to check:
1) tbxYear1 and tbxYear2 are both optional, but if values are entered they
have to integers and non-negative
2) if values are entered for both tbxYear1 and tbxYear2 then tbxYear1 must
be less than tbxYear2
It...
|
by: msnews.microsoft.com |
last post by:
I have 2 datagrids. Each with an add record in the footer. How can I just
validate the fields in that datagrid without validating the fields in the
2nd datagrid. Any examples???
--
David
|
by: hamil |
last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview
control, the PageSetup control, and the Print dialog control. The code
attached is a concatination of two examples taken out of a Microsoft book,
"Visual Basic,Net Step by Step" in Chapter 18.
All but the bottom two subroutines will open a text file, and then allow me
to use the above controls, example 1. The bottom two subroutines will print
a graphic file, example...
| |
by: Brybot |
last post by:
I have a form that i've split up into multiple asp:panels, each panel
has a number of validators which work correctly.
At on the last panel, i want to commit the data collected to a
database. I figured since all the panel data is still being sent
through the postbacks, instead of using Sessions, or HttpContext, I
could just take the values from the textboxes.
This all works fine, except for security. I realized that I could
inject...
|
by: Madhur |
last post by:
Hello All
I am learning how to use ASP.NET Validators and would appreciate if someone
could provide me with guidance.
I have written very simple ASPX page below with a Dropdown list, a button.
If a value of 3 is selected inside dropdown list , I add two text boxes each
attached with validators.
|
by: Jordan S. |
last post by:
I'm experimenting with dynamically inserting custom composite Web server
controls onto a page. For testing purposes I have two custom composite Web
server controls that each have a couple of TextBox controls and a "submit"
button, as well as required field validators for each of the textboxes.
What I'm finding is that when both of these Web server controls appearon the
page, clicking on the "submit" button of either of the controls causes...
|
by: timj |
last post by:
Anyone suggestions how to cleanly realize a page with multiple validationsummaries that display only the messages of controls that belong to the same validationgroup?
So for example three validators that belong to validationgroup 'test1' only display in validationsummary with validationgroup 'test1', and three other validators (vg = 'test2') at the same time display only in another validationsummary (vg = 'test2')
Thanks in advance.
|
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: 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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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: 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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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: 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
| |