473,785 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Validationgroup s and IValidator problem (ASP.NET 2.0)

Hi all,

I have a serious problem with asp.net validation: I developed a custom
validation summary control, which will lookup error messages from an external
source based on the BaseValidator.E rrorMessage property. This validation
summary control has a custom method which will add a dummy validator (which
will always evaluate to false) to the Page.Validators collection. The dummy
validator implements the IValidator interface, and this structure worked fine
on ASP.NET 1.1.

However, ASP.NET 2.0 supports validation groups, so I decided to add a
custom 'ValidationGrou p' property to the dummy validator class, because I
want my custom validation summary control to support this much-welcomed
feature. The problem is that the Page.GetValidat ors(string validationGroup )
will loop through the page's Validators collection and cast each validator to
a BaseValidator! This way, my custom validator is casted to a null value and
won't be added to the collection of validators returned by the
Page.GetValidat ors method.

Does anybody have any suggestions how to resolve this?

TIA,

Arnold Jan van der Burg
MCSD
Dec 9 '05 #1
0 1347

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

Similar topics

3
3915
by: masonj | last post by:
For no apparent reason, my webpage cannot be brought up due to an internal server error. My host tells me an asp 0126 error occurred because an include file is missing. Its there. I've also checked the code in the .asp and found everything to be accurate (I mean nothing has changed and it was working fine before). Any ideas? I can post the code if you'd like to see it. Thanks, Mason
0
1480
by: Georgeo Pulikkathara[MS] | last post by:
ASP.NET Webcast Week - January 19 - 23, 2004 Learn about ASP.NET from the experts! These free webcasts are live and interactive. Live code demos and attendees asking in depth engaging questions are all part of these live webcasts. This is a great way to get educated, engaged, and enlightened on Microsoft ASP.NET. Register for all 12 webcasts at http://msdn.microsoft.com/asp.net/using/training/webcasts. ...
4
2742
by: Max | last post by:
Hello. This is the first time I've posted to a newsgroup, and I do this because I'm in desperate need of help. I'm working a user management system, and when I activate a user that has registered to my system, the current admin user logged in gets logged out. I can't seem to work out how - I can't even trace back where some of the variables are coming from (for example, the "ref" part of the Request.QueryString method). Could someone...
11
4975
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g., http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=Tidy7IDbDHA.2108%40cpmsftngxa06.phx.gbl) that indicate that ASP will queue up requests when they come in with the same "session".
1
1940
by: Rahul Apte | last post by:
How do I programmatically check whether ASP and Server Side Includes sub-components of the World Wide Web service are installed on a Windows 2003 Box? I want to do these checks as pre-install checks for a software. Thanks in advance. - Rahul A.
0
1660
by: Martin | last post by:
Hi, I wanted to preform my own custom validation for the entire page so i though I would implemet the IValidator interface and do all of my validation in the "Validate" method, and this works well with one small problem. The "Page" class has a property called "IsValid" which is read-only. IValidator implements a private variable called isvalid
1
3195
by: brantman | last post by:
Here is a question that needs to be revisited. I noticed that there are more that a few posts about this in this group and in custom controls. Here is the problem: When inheriting from a webcontrol, say textbox for example, and implementing the IValidator interface to make the control self-validating, the control fails to participate in validation groups. Using reflector, it is easy to see why; the page.validator casts all the controls in...
0
1014
by: s9213037 | last post by:
I would like to let users check the input format of a Textbox during filling the whole form by clicking a button, say checkButton, to postback to server. Further, when clicking the "submit button" to submit the total content to web server, the foramt of input inside the Textbox can be still validated. In other words shortly, how could I assign a validation control to "two" ValidationGroups. In this case, one is checkButton and the...
1
5591
by: COHENMARVIN | last post by:
I have a page that has several validators, and they are organized into validation groups. I want to check the 'Page.IsValid' flag, but I don't think I can make it restrict itself to one validation group. How do I check whether the first validation group is valid, without having the other groups checked at the same time? Thanks, Marvin
0
9645
marktang
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...
0
9481
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,...
0
10341
Oralloy
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...
0
10155
jinu1996
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...
1
10095
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,...
0
9954
tracyyun
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...
1
7502
isladogs
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...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
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 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.