473,396 Members | 1,921 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,396 software developers and data experts.

validationgroup property origin ?

Hi

I'm wondering in which class or interface the validationgroup property
originates.

i have created a web user control that uses the validation group
property on textboxes, dropdownlist, validators etc..
the problem is that on my page i have to put 2 of those web user
control
when i submit one the other fails to validate

how can i set different validation group per web user control

i wanted to iterate the controls to set their validationgroup by
calling a method :

protected void SetValidationGroup()
{
foreach (Control ctl in this.Controls)
{
BaseValidator bv = ctl as BaseValidator;
if (bv != null)
{
bv.ValidationGroup = this.ClientID + "VG1";
}
}
}

the problem is that the BaseValidator Class is only for validator
controls, I want to set it for all controls that implement
validationgroup

which class should I use or is there an other way to have 2 user
control and only have one to validate at a time

thanks

Jul 25 '07 #1
1 2569
you are confused. the ValidationGroup property is on validators
(BaseValidator) or controls that fire validation on postback
(IButtonControl). TextBoxes and dropdownlists do not have a validationgroup.

-- bruce (sqlwork.com)

fredd00 wrote:
Hi

I'm wondering in which class or interface the validationgroup property
originates.

i have created a web user control that uses the validation group
property on textboxes, dropdownlist, validators etc..
the problem is that on my page i have to put 2 of those web user
control
when i submit one the other fails to validate

how can i set different validation group per web user control

i wanted to iterate the controls to set their validationgroup by
calling a method :

protected void SetValidationGroup()
{
foreach (Control ctl in this.Controls)
{
BaseValidator bv = ctl as BaseValidator;
if (bv != null)
{
bv.ValidationGroup = this.ClientID + "VG1";
}
}
}

the problem is that the BaseValidator Class is only for validator
controls, I want to set it for all controls that implement
validationgroup

which class should I use or is there an other way to have 2 user
control and only have one to validate at a time

thanks
Jul 25 '07 #2

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

Similar topics

1
by: TPSreport | last post by:
I log on to the cookieless application, work within it for awhile, jump to a URL outside the application, then return to the application. As soon as a db call is required, I get the error below. ...
2
by: news.microsoft.com | last post by:
ASP.NET 2.0 Is it possible to set more than one ValidationGroup to a Button? I have two sets of controls on a Web page, into two different ValidationGroups. I would like when the user clicks...
0
by: Kay | last post by:
Hello, I have written my own custom control and I want one of its properties to display as a dropdown list when clicked, so the user can select from the list, it would be similar to the asp...
0
by: Kay O'Keeffe | last post by:
Hello, I have written my own custom control and I want one of its properties to display as a dropdown list when clicked, so the user can select from the list, it would be similar to the asp...
7
by: Gary | last post by:
Hi i'm exploring a tutorial stylesheet which uses the following code #header ul li a { .... line-height: 0.8em !important; line-height: 1em; .... }
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hello misters, I have an application web in asp.net 2.0. I use ASP.NET AJAX and AjaxControlToolkit. I have several tabs in an aspx page, and I try validate controls. I include ValidationGroup...
0
by: pompeymike | last post by:
Hi, I have a form with panels, within which is a Formview. In the InsertItemTemplate for the FormView I have validation using RequireFieldValidators. These all work correctly, but if I use a...
0
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. I have an aspx page w/2 update panel controls UpdatePanel1 & UpdatePanel2. UpdatePanel1 uses validationgroup="a" for all of it's validation controls & button controls. UpdatePanel2 uses...
1
by: KUTTAN | last post by:
I have 2 divisions in a .aspx file Left division for sing up and Right division for login
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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...
0
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,...
0
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...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.