473,378 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to set few validation groups for one control? (ASP.NET 2.0)

Hi all.

I have following problem:
I have some user control called smallUserContrl, in which I have two
RangeValidator controls. I set their ValidationGroup property to
smallUserControlGroup.

Also I have another user control called bigUserControl, in which I use
smallUserControl. BigUserControl also has some validator, which has
ValidationGroup property set to bigUserControlGroup.

The problem is that I want to fire both validations at once
(smallUserControlGroup and bigUserControlGroup). Of course I could set
ValidationGroup property in both user controls to the same value, but
it is not a good solution. Imagine such situation: I have some page and
put there BigUserControl (which includes SmallUserControl) and also
another SmalUserControl. In such situation every validator control on
my page will be fired and that is not good, because maybe I would like
to fire validators only from bigUserControl.

Solution for this might be setting few ValidationGroups for one control
e.g. button, but it doesn't work.

Is there some other solution?

Thanks in advance

Mar 9 '06 #1
1 3807
Even when Microsoft adds a new feature to address the limitations of their
past work, they don't always make it handle all the cases. Your case is a
reasonable one and not supported by validation groups in ASP.NET 2.0. That
system only matches to a single group name.

My Professional Validation And More (http://www.peterblum.com/vam/home.aspx)
is a replacement to the original validators. It handles this case. Its
validation groups permit one group, a list of groups
("groupname1|groupname2") and all groups using the token ("*").

Aside from that, you would have to develop some kind of hack.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"misiek" <pt*********@poczta.fm> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hi all.

I have following problem:
I have some user control called smallUserContrl, in which I have two
RangeValidator controls. I set their ValidationGroup property to
smallUserControlGroup.

Also I have another user control called bigUserControl, in which I use
smallUserControl. BigUserControl also has some validator, which has
ValidationGroup property set to bigUserControlGroup.

The problem is that I want to fire both validations at once
(smallUserControlGroup and bigUserControlGroup). Of course I could set
ValidationGroup property in both user controls to the same value, but
it is not a good solution. Imagine such situation: I have some page and
put there BigUserControl (which includes SmallUserControl) and also
another SmalUserControl. In such situation every validator control on
my page will be fired and that is not good, because maybe I would like
to fire validators only from bigUserControl.

Solution for this might be setting few ValidationGroups for one control
e.g. button, but it doesn't work.

Is there some other solution?

Thanks in advance

Mar 9 '06 #2

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

Similar topics

3
by: Paul | last post by:
This is what I am trying to do *********************************form1*********************** Control 1 required field validator 1 Control 2 required field validator 2 Submit button 1 (works...
1
by: NancyASAP | last post by:
Thought I'd share this since it took me a long time to get it working. Thanks to a bunch of contributers in Google Groups who shared javascript, etc. The question was: How can I put a reset...
4
by: David Colliver | last post by:
Hi all, I am having a slight problem that hopefully, someone can help me fix. I have a form on a page. Many items on the form have validation controls attached. Also on this form are...
1
by: MattC | last post by:
I have a user control that contains several requiredFieldValidators. The page the control sits in has other RequiredFieldValidators. On submitting the form all the validators on the page fire and...
4
by: ibiza | last post by:
Hi all, I have a small question concerning asp.net 2.0 validation groups. I have this (simplified) situation : Name Value _____ _____ |_____| |_____| _____ _____...
5
by: Lloyd Dupont | last post by:
On my page the user is ask to set of question. Say there I have 2 controls like that == pseudo-C#-code for my control == class MyControl : CompositeControl { TextBox text; LinkButton button ...
0
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...
1
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...
2
by: moondaddy | last post by:
How can I have a page with 2 different groups of controls (where each group of controls contain textboxes, validation controls and a submit button) and each group operate independently? for...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.