I am successfully using the client side validation controls, but there
are a couple aspects of their behavior that I wish to modify. I cannot
see how to accomplish this through the properties, but I thought I
would ask here for advice.
- ValidationSumma ry
When there are validation errors on the page, the summary control
displays its HeaderText at the top of my form. However, it lists each
validation problem. Additionally each error is shown next to the
problem control. This is all fine except for the summary control
listing each validation problem. How can I make it so that the summary
control only displays its HeaderText and suppresses the errors for each
control?
- Multiple Validators For a Control
I have a required field and a regular expression validator on one
control. The controls are created on the form in the order of required
validator first and reg exp validator second. When the control has
some data, but fails the regular expression, the error message is
shifted to the right of the required field message (which remains
hidden). Looking at the HTML I see the validators use a
visibility=hidd en style instead of a display=none style. Is there a
way to make the validators use the latter attribute? This would solve
the alignment issue.
Thanks,
John 5 3687
The ValidationSumma ry is controlled by what you specify for the ErrorMessage
property for each of the individual Validation controls. If you leave this
empty then the ValidationSumma ry won't show an entry for that validation
control. If you were previously using the ErrorMessage property to indicate
the message next to the control you were validating, use the Text propery
instead (or just put content inside the validation control begin & end tags).
-Brock
DevelopMentor http://staff.develop.com/ballen I am successfully using the client side validation controls, but there are a couple aspects of their behavior that I wish to modify. I cannot see how to accomplish this through the properties, but I thought I would ask here for advice.
- ValidationSumma ry
When there are validation errors on the page, the summary control displays its HeaderText at the top of my form. However, it lists each validation problem. Additionally each error is shown next to the problem control. This is all fine except for the summary control listing each validation problem. How can I make it so that the summary control only displays its HeaderText and suppresses the errors for each control?
- Multiple Validators For a Control
I have a required field and a regular expression validator on one control. The controls are created on the form in the order of required validator first and reg exp validator second. When the control has some data, but fails the regular expression, the error message is shifted to the right of the required field message (which remains hidden). Looking at the HTML I see the validators use a visibility=hidd en style instead of a display=none style. Is there a way to make the validators use the latter attribute? This would solve the alignment issue.
Thanks, John
Oops, I dind't answer the second half of your question. You want to use the
Display="Dynami c" (instead of Display="Static ") on the validation controls.
This will render visibility:hidd en instead of display:none.
-Brock
DevelopMentor http://staff.develop.com/ballen - Multiple Validators For a Control
I have a required field and a regular expression validator on one control. The controls are created on the form in the order of required validator first and reg exp validator second. When the control has some data, but fails the regular expression, the error message is shifted to the right of the required field message (which remains hidden). Looking at the HTML I see the validators use a visibility=hidd en style instead of a display=none style. Is there a way to make the validators use the latter attribute? This would solve the alignment issue.
Thanks, John
Great, thanks for the tips. Another question if you don't mind.
I notice the validation puts the following code in the onsubmit event
for the form...
if (!ValidatorOnSu bmit()) return false;
However, on another site I have it only puts...
ValidatorOnSubm it();
On the former, I cannot get the form to submit and the latter works
fine. Also the latter is what I see on other asp.net sites. What
would cause the validation framework to put the former code in?
Thanks,
John
Hi John,
The ValidationSumma ry is not designed to only show the HeaderText. You have
to add a minimum of something like " " to the ErrorMessage property and
set its DisplayMode to SingleParagraph . You will always get an extra line
containing those spaces.
I wrote a replacement to Microsoft's validators that greatly increases the
featureset of the validation system. "Profession al Validation And More"
( http://www.peterblum.com/vam/home.aspx) basically addresses most complaints
users have with Microsoft's validators, avoiding the custom code and hacks
users have faced. Some examples of how it works better for you:
- The ValidationSumma ry's DisplayMode has a setting of "None" so that you
never show anything for error messages in the summary.
- The RegexValidator has a property, IgnoreBlankText , that when false, will
report an error if the text is blank. That avoids adding a
RequiredFieldVa lidator.
- When you want to combine validators together under one error message, use
my MultiConditionV alidator.
- All of my 22 validators support client-side validation on IE, IE/Mac,
Mozilla, Netscape 7, FireFox, Opera 7, and Safari. Microsoft's only works on
DHTML browsers (IE and IE/Mac).
--- 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
<jo************ @inginix.com> wrote in message
news:11******** **************@ l41g2000cwc.goo glegroups.com.. . I am successfully using the client side validation controls, but there are a couple aspects of their behavior that I wish to modify. I cannot see how to accomplish this through the properties, but I thought I would ask here for advice.
- ValidationSumma ry
When there are validation errors on the page, the summary control displays its HeaderText at the top of my form. However, it lists each validation problem. Additionally each error is shown next to the problem control. This is all fine except for the summary control listing each validation problem. How can I make it so that the summary control only displays its HeaderText and suppresses the errors for each control?
- Multiple Validators For a Control
I have a required field and a regular expression validator on one control. The controls are created on the form in the order of required validator first and reg exp validator second. When the control has some data, but fails the regular expression, the error message is shifted to the right of the required field message (which remains hidden). Looking at the HTML I see the validators use a visibility=hidd en style instead of a display=none style. Is there a way to make the validators use the latter attribute? This would solve the alignment issue.
Thanks, John
Hmm, don't know iff the top of my head withouyt looking at all of the code.
Perhaps it's a diff between ASP.NET 1.0 and 1.1?
-Brock
DevelopMentor http://staff.develop.com/ballen Great, thanks for the tips. Another question if you don't mind.
I notice the validation puts the following code in the onsubmit event for the form...
if (!ValidatorOnSu bmit()) return false;
However, on another site I have it only puts...
ValidatorOnSubm it();
On the former, I cannot get the form to submit and the latter works fine. Also the latter is what I see on other asp.net sites. What would cause the validation framework to put the former code in?
Thanks, John This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: newusertodotnet |
last post by:
I'm trying to add a ValidationSummary control to a common base page used by
all of our system's aspx/ascx files. The base page is a regular class file
that inherits from System.Web.UI.Page. When I debug the application and click
the submit button with a data element that fails a validation, I get the
correct ValidationSummary messageBox, but I then receive the following error
in WebUIValidation.js ValidationSummaryOnSubmit():
Microsoft...
|
by: John Mabbott |
last post by:
Hello all,
We're getting some weird behavior with the ValidationSummary control.
If I submit a page that fires some validators, the ValidationSummary
displays them correctly. However, if I subsequently submit the page,
the ValidationSummary control briefly disappears before re-appearing
again! So, to recap:
1. I load one of my pages
2. I don't fill any of the input boxes and submit the page, causing
|
by: Christer |
last post by:
Hi all!
I recently created a MessageBox webcontrol for asp.net. This can be
used as is, but I also want to take ude of it in other webcontrols.
Right now i creating a ValidationSummary control, that makes use of my
messagebox to show the summary of failing validators.
So far I've been successfull achieving this. However, the serverside
nature of the MessageBox currently forces all validators (and the
validationsummary) to have...
|
by: Sunil Sabir |
last post by:
Dear All,
I am using ValidationSummary,RequiredField Validator and Regular
Expression Validator in my ASP.net form. I want to display error
messages only in the ValidationSummary Control. But when I run
the form the messages are displayed ValidationSummary,RequiredField
Validator and Regular Expression Validator together . Is it possible that
the message is displayed only in ValidationSummary control and not in
RequiredFieldValidator...
|
by: SMG |
last post by:
Hi All.
My forms has two textboxes, 1 username, 2 password.
Both has requiredfield validator it works fine when there is no input in
these textboxes.
And the errorMsg is shown in ValidationSummary.
Now I want to check the username should contain only chatacters,
( I want to use customvalidator), when i enter char+number it trap the event
of customvalidator but it doesn't show the errormsg in the customValidator
and submits the form.
| |
by: Dan Sikorsky |
last post by:
I'm using SmartNavigation and need to automatically scroll to the top of the
page when the ValidationSummary control catches errors and displays them, so
that the user can see the errors without having to manually scroll to the
top.
How can I determine if the ValidationSummary will display errors so that I
can issue a javascript window.scrollTo(0,0) or document.body.scrollTop = 0
(or something more appropriate) to automatically scroll to...
|
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: Code Rodent |
last post by:
Hi there,
Please please could someone shed some like on a problem that I'm having
using a combination of Wizards, ValidationGroups and ValidationSummary
controls. What I want to do is to have a wizard that will take me through
several steps, and at each step validate input data using
RequiredFieldValidators etc. displaying any errors in a Validation Summary.
The problem that I have is that I cannot seem to have a ValidationSummary...
|
by: Code Rodent |
last post by:
Hi there,
Please please could someone shed some like on a problem that I'm having
using a combination of Wizards, ValidationGroups and ValidationSummary
controls. What I want to do is to have a wizard that will take me through
several steps, and at each step validate input data using
RequiredFieldValidators etc. displaying any errors in a Validation Summary.
The problem that I have is that I cannot seem to have a ValidationSummary...
|
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: 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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |