473,549 Members | 2,455 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Validation Controls within user control

I have a telephone number user control in which I need to validate the
data entered (Required field validation and regular expression
validation). The phone number is represented as 3 text boxes so I have
3 required field validation and regular expression validation controls.
I set the display property to none and have a validation summary
control in my hosting page. I have a method in the user control that
then assigns the error message and the validation group to these 6
controls. The problem I'm having is that if a user doesn't enter data
in any of the fields they get 3 duplicate error messages. Is there any
way to prevent duplicate messages from showing up in the validation
summary control???

Apr 13 '06 #1
2 2425
3 controls, 3 validarors, 3 messages..... Thats whats going to show up. Why
do you think error message is duplicate?

<ti****@gmail.c om> wrote in message
news:11******** **************@ t31g2000cwb.goo glegroups.com.. .
I have a telephone number user control in which I need to validate the
data entered (Required field validation and regular expression
validation). The phone number is represented as 3 text boxes so I have
3 required field validation and regular expression validation controls.
I set the display property to none and have a validation summary
control in my hosting page. I have a method in the user control that
then assigns the error message and the validation group to these 6
controls. The problem I'm having is that if a user doesn't enter data
in any of the fields they get 3 duplicate error messages. Is there any
way to prevent duplicate messages from showing up in the validation
summary control???

Apr 13 '06 #2
I realize that if there are 3 validation controls then three messages
are going to show up; at least by default. I was essentially asking if
there is a way around this.

I think the messages are duplicated because they are duplicated. I
understand why they are duplicate; I was just trying to see if there is
an easy way around this.

Apr 13 '06 #3

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

Similar topics

0
1106
by: nzanella | last post by:
Hello, I have an ASP.NET HTML form control with multiple HTML input button controls each of which has an associated HTML input control. For each HTML input control I have a validator that checks that the input value is greater than zero. But I want zero to be displayed within the text field and want the validator to run only when the...
2
3681
by: buran | last post by:
Dear ASP.NET Programmers, I have a web user control (a search menu) which has 2 validation controls (one for input and another for the search criterion). I am including this search user control in ever page in my application. In pages with validation controls, both the validation controls in the web user control and the normal form page are...
2
3711
by: Barbara Alderton | last post by:
I setup some standard Required Field Validation controls and one Custom validation control on an ASP.NET page (within a user control) to validate text entry. I also setup a Summary Control to post all the messages to a message box (ShowMessageBox=true). The required field validation error messages show up in the summary just fine but I can't...
9
2212
by: AFN | last post by:
I was just dropped into someone else's code (isn't that always so fun?). I can't figure out why a custom validation control's server event function is executing. There is nothing (that I see) in page_load, or elsewhere, that says page.validate, no control says "causesvalidation=true", and the AutoEventWireup is set to false. So I would...
2
1595
by: Martin | last post by:
Hi, I have a page with 4 web user controls on. Each of these web user controls has some asp.net controls on that have validation events attached to them. Now because there are 4 seperate users controls I have 4 seperate validation summaries, what I would like is to have only a single validation summary at the top of the page, ie not in...
3
5773
by: ilockett | last post by:
The background: I have a web app with a simple master page that contains just one content placeholder. I have created a web form that then uses this master page. Within the content placeholder, I have placed a Login control (Login1) and a ValidationSummary control. I have set the ValidationSummary's ValidationGroup property equal to...
0
1699
by: dhurwitz | last post by:
Hi, In my ASP.NET 2.0 web app, I have a user control, ucBinEdges, with several text boxes. The user control has several validation controls validating the Text of these text boxes - CompareValidator, RangeValidator, RequiredFieldValidator, and a ValidationSummary. The page using ucBinEdges is a content page working in conjunction with a...
3
1495
by: J055 | last post by:
Hi I've been puzzling over this one for a while now. I'm not really sure what the best and cleanest approach would be here. This is what I want to do. A User enters some values in a FormView control and submits the form. A CustomValidator checks the database for duplicate entries. If a duplicate is found the Page.IsValid property is made...
2
2181
by: msch.prv | last post by:
Is there a specific method to disable field validators in a user control.from within a parent page or does it require an ad hoc approach? The page attribute ValidateRequest does not seem to be available in user controls. TIA for any inputs.
0
7542
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...
0
7467
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...
0
7982
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...
1
7500
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...
0
3514
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...
0
3494
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1961
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
1
1079
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
783
bsmnconsultancy
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...

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.