Creating a User Control validator that validates a control on the page, rather than inside the control.

I'm trying to create a custom user control that is nothing more than a RangeValidator that validates other controls that lie on the page rather than inside the control itself... is this possible, is there a way to "bubble" it up.

Thanks,
G
0
grier_allen
5/5/2004 2:21:52 PM
asp.net.getting-started 91979 articles. 3 followers. Follow

1 Replies
1263 Views

Similar Articles

[PageSpeed] 40

My answer to your other question regarding the CompareValidator applies here. If the custom control is in the same naming container AND does not implement INamingContainer, you can create a property that lets the user assign the control to validate. Internally assign the Validator.ControlToValidate property to the value of that property.
--- Peter Blum
Creator of Peter's Data Entry Suite (formerly Professional Validation And More and Peter's Date Package) and Peter's Polling Package
www.PeterBlum.com
0
PLBlum
5/5/2004 10:36:51 PM
Reply:

Similar Artilces:

User Controls not working if I put Validation controls in user control
Hi           I have validation controls(RequiredField Validator,RegularExpressionValidator)  in user controls.User controls are not posting back like the events are not wiring up.If I remove Validation controls in User controls page,user controls are working fine.Can anyone please help me out in getting it fixed. In the Validation controls, make sure you are setting the ControlToValidate property to the control that it links to.  If you're in .NET 2.0, it's also a good idea to put all the validation controls in the same Valid...

Controlling the controls a validator validates
Hello, I want to control which controls appear for a validator when they go to controltovalidate dropdown in property grid.  Is the solution to create a designer for the control?  How do you regulate that?  I can't override the ControlToValidate property... Thanks.Brian"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4). Well ur logic is true, thats the way, what u need to do is not override the property (cant), create another property, that implemen...

Validation for controls that is inside user control
I have a dropdownlist (only control) in the user control. This user control is used inside the formview. What is the best way to validate from the formview wether this contol has a value selected. Thanks Use the RequiredFieldValidator. Set its InitialValue property to the same value you assign to the unselected item's ListItem object. Keep in mind by "Value", there are two data elements on ListItem: Text and Value. Text is shown to the user. Value is internally used and is what you assign to InitialValue.--- Peter BlumCreator of Peter's Data Entry Suite (formerly Profess...

validating the Controls inside the User control.
Hi,   In my aspx page i have a two butons. 1. Add New  2. Save Every time when  i click the Add New  button i load the user control by programatically.so multiple user control inside the panel. Then the user control  have some textboxes. i want to validate(using javascript) the textboxes when i click to save button.becoz all the textboxes have different name on runtime. can anyone helpme out this problem.   Thanks. Safiulla     safiulla: In my aspx page i have a two butons. 1. Add New  2. Save Every time wh...

Validation controls inside user controls
Hi, I'm creating a very simple user control to which I also added a validation control. For example: In Assignment.ascx: <asp:DropDownList ID="ddlOrganization" runat="server"></asp:DropDownList><asp:RequiredFieldValidator ID="rfvOrganization" runat="server" ControlToValidate="ddlOrganization" ErrorMessage="L'organisation est requise." Text="*" Display="Dynamic"></asp:RequiredFieldValidator> <asp:TextBox ID="tbxProject" runat="server"></asp:TextBox&...

User Control controls not created when dynamically creating user control
  Have created a user control for displaying and editing a dynamically number of values. The user control contains two labels and an edit box. When dynamically loading the user control I get an error when the control itself tries to change setting on the fields within the user control.   Why doesnt this work? It works okay if I dont load it dynamically but create a user-control-instance in the aspx-page but thats no solution.   Thankyou!     Here is my code:   ucDataValue.ascx   <%@ Control Language="C#" AutoEventWireup="true&...

Validation Control in the User Control
I have phone(4 boxes for area code, phone no, ext.) user control, and placed the custom control in the user control. I have used this user control in the page, validation control error messages won't show up. Any help would be great. Suresh    ...

How to do post back in a dynamically created user control [provided that update panel is in the master page of the page where user control is added] {B/C of FileUpload Control}
I have a register my scriptmanager and place the update panel around contenttempalte for my pages int the master page. Now in one of my pages i am adding some user controls dynamically. In two of my user user controls I have FileUpload control which will not work under partial post back. So I want's full postback for them How could I do that {Provided that i am on the user control,which is inside the page ,and page have the contenttemplat...

Validation Controls in User Control not stopping page postback
Hi Everyone, I have a user control that contains a few textboxes, a regex validator, and a compare validator. On some pages, the validator in the user control stops the page from posting  back, and on some pages it doesn't. I checked and the button 1) Doesn't have a ValidationGroup 2) Has CausesValidation = "true" (which I am aware is the default). I need the Validator in my user control to ALWAYS stop the page that it contains is the validation fails. Is there something I am not aware of regarding user controls and validation? Thanks. Hi Puhfista, Forgive me if i get u wron...

How to validate controls on a .NET 2.0 Web user Control
Hi Guys, (ASP.NET 2.0 / C#) I've looked thorugh every post on validating web user controls (and know about Pter Blum's Professional Validation and More package) - but can't seem to get my head around whre to start. I have a web user control, called wucICL.ascx on a we page called AddEditInvestment.aspx.  I would like to validate a couple of DropDownLists (ddlAccounts and ddlContacts) when the Insert and Update buttons are clicked on the AddEdit Investment page. The other controls on the AddEditInvestments page belong to a validation group called All Validators and the DropDownL...

Validation controls are triggereing other forms validation controls?
Can someone please look at this an explain whats going on. When you click on subscribe it triggers my registration form validation controls. I'not sure what "subscribe" is supposed to do, but if you dont want it to cause validation, set the CausesValidation property to false.Mike Banavige~~~~~~~~~~~~Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/ Make sure the feild is an email address Hey coolkidsonly, your initial posting didn't show us anything to look at. We are just guessing here without the specifics. However, m...

How to display all of my validation controls in my Validation summary control?
I have a  validation summary control I am using on a web form to validate various controls on a web form. For one of the controls  which is a text box control, I have a custom validation control. When someone presses the save button, all of the controls are validated. If any errors occur, then the error message is displayed in the validation summary area above all of the controls. This is what I want. The problem though is that I also get an error message next to my text box which was assigned the custom validator control. The problem here is that the error message i...

Validation Control question
Hello.  I have a form with several validation controls checking input boxes.  This form also has a DDL (dropdownlist).  This form also has a formview control in insert mode - this formview control has the validation controls.  The formview visibility is set to false. When a user selects an item from the DDL (which causes a postback) I set the visibilty of the formview to true.  At this point the validation controls are showing errors in th evalidation summary even though the user has not attempted to do any inputs. Where or how can I control when the validation ...

how to raise server control event(control defined inside user control) from host page?
I have built a user control(using c#,net 2.0,VS2005,MS-SQL server 2005),which contains set of 3 button,save,cancel and next and wud be reused/displayed in multiple pages.As the name says,they are suppose to update on save,reset the fields   on cancel and navigate to another page on next.How do i raise the onClick event for all of these button individually,from the individual host page?I do not have/do not prefer any logic,event handler etc.. defined in the user control for these buttons,since every host page have different set of parameters for save,cancel etc.Thanks...

Web resources about - Creating a User Control validator that validates a control on the page, rather than inside the control. - asp.net.getting-started

CSE HTML Validator for Windows (Official Site) - Powerful HTML Validator, XHTML Validator, CSS Validator ...
CSE HTML Validator is a powerful and easy to use offline HTML, XHTML, CSS, JavaScript, and PHP syntax checker, HTML validator, XHTML validator, ...

DNSSEC/TLSA Validator
DNSSEC/TLSA Validator is a web browser add-on which allows you to check the existence and validity of DNS Security Extensions (DNSSEC) records ...

Feed Validator for Atom and RSS
F E E D Validator for Atom and RSS and KML Jump to navigation RSS Profile Support Added ( more ) Home · About · News · Docs · Terms Copyright ...

Credit Card Validator on the App Store on iTunes
Get Credit Card Validator on the App Store. See screenshots and ratings, and read customer reviews.

Not fare: new myki card validators lack account balance information
New myki card validators will not tell passengers what their fare is, nor their account balance, leaving unable to monitor their myki use as ...

Mozilla launches new JavaScript-based Add-ons Validator for developers
... that the validation tool provided by Mozilla is unreliable and difficult to use. Today the company announces that the old Python-based validator ...

Business Insider Built An Awesome Analytics Validator And You Can Use It
At a fast-growing media company like Business Insider, keeping accurate analytics is absolutely essential. Editors rely on our analytics dashboard ...

Jon Voight, Validator of Right-Wing Frenzy
Jon Voight was once known for his acting chops and, later, for fathering Angelina Jolie. These days? Well, he's known for his rabid right-wing ...

chocolatey/package-validator · GitHub
package-validator - Windows service to validate packages conform to pacakge standards

Bing Webmaster Tools Adds Markup Validator
The Bing Webmaster Blog announced they have added a new feature to the crawl section named Markup Validator. To access this new feature, login ...

Resources last updated: 2/8/2016 3:35:59 PM