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.
2/12/2004 9:08:06 AM 93655 articles. 5 followers. Follow

8 Replies

Similar Articles

[PageSpeed] 25

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:
2/12/2004 12:58:44 PM
Make sure the feild is an email address
2/12/2004 7:20:32 PM
Hey coolkidsonly, your initial posting didn't show us anything to look at. We are just guessing here without the specifics.

However, my guess is that you have a button which you don't want to fire the validators. The earlier suggestion was correct: set the CausesValidation property to false on the button.
--- Peter Blum
Creator of Peter's Data Entry Suite (formerly Professional Validation And More and Peter's Date Package) and Peter's Polling Package
2/12/2004 9:55:17 PM is the link. If you press the subsribe button it fires the validators from the reg form
2/12/2004 10:14:06 PM
It worked correctly. No validators fired. I suspect that you followed the earlier emails and set that button's CausesValidation property to false.
--- Peter Blum
Creator of Peter's Data Entry Suite (formerly Professional Validation And More and Peter's Date Package) and Peter's Polling Package
2/13/2004 3:24:36 PM
actually the vote controls fires the other forms now. Im confused
2/13/2004 9:33:27 PM
The problem is that you have three forms on the page. ASP.NET doesn't allow you to validate these three forms as separate sets of fields. You can disable validation on two of these forms to get this to work, but it means that your subscribe form and your vote form can be submitted back to your server incomplete.

There are commercial ways around this. The Mad! Widgets Validation package allows you to define groups of related fields so that they behave in the traditional form-like manner. Each form can be validated independently of the other. There are loads of other funky features. Check it out if you want to get serious about validation.
- Richard Alleman

If you're serious about validation, try the Mad! Widgets Validation Package
2/14/2004 1:17:26 AM
ANY button that you don't want to validate the page should be set to CausesValidation=false.

Richard Alleman also identified another angle, "validation groups", that his and my commercial products support. (Mine is Professional Validation And More.) I don't believe you've described a scenerio that requires validation groups. A validation group allows a button to fire its own validators and not other validators on the page. In your case, only one of the three buttons on the page sounds like it has any validators to fire. That's when CausesValidation=false applies.
--- Peter Blum
Creator of Peter's Data Entry Suite (formerly Professional Validation And More and Peter's Date Package) and Peter's Polling Package
2/14/2004 10:53:23 PM

Similar Artilces:

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...

how to call controls of web control form in coding of other forms?
hello everyone i have one problem i have created one webcontrol shoppingcart in which there are two labels one of qty and other of amt which are initially enable =falsenow on other page(aspx page) i have one txtbox of qty as txtqty i want tat as soon as user enters qty txtqty and clicks on add cart button it shd be display d value in lblqty of web control shopping cart make sure i m using datalist on aspx page so give me suggestions on tat basis and my coding is in vb. plz give ur suggestions as fast as possible. Neeti what do you mean by webcontrol.... it this user control or normal ...

validate Textbox in Web User Control from web form?
ASP.NET 2.0 I have a web user control that contains a textbox.  I need to add some validation (like requiredfieldvalidator, comparevalidator, etc). I would normally add the validator to my web user control by placing the validator next to my textbox.  However, I need the validation message somewhere else on my web form, not near the user control. So how would I associate a validation control on my web form with the text box inside my web user control?  Can this be done; any alternatives out there? Thanks!   The error message should occur wherever you place the vali...

Web Form and Validation Controls
Hi, I have two problems with my Web Form. I have text boxes which represents a bill to address and a ship to address. Between the two addresses, I have a check box. The check box is used to allow user to enter a ship to address if it is different than the bill to address. So, if user wants to enter in a ship to address, then he will check the box. I have code which will enable all the ship to address's text boxes. I am using required field validation controls with the validation summary control. First problem, with no ship to address: If I enter in a bill to address correc...

Validating States dropdownlist with all other validation controls on form?
I have States dropdownlist  starts with "--" ListItem and 50 States. If user select "--" first ListItem, I need validate at client. Right now I am doing code behind side validation. But I have other controls on the form for validation, So I need to validate all at time. on submit button click.   Hi Srikanth, Place a required field for states dropdown list and set the "intial value" property of required field validator to "--". On Submit click validation is done. Above is the solution if i am not misunderstood you.   Regards, Pra...

User Control Form validates parent page form ?
Hello, small problem I found after using a user control I made. The user control I made consists of a small form that I place in the footer of my application. For some reason whenever I press the submit button on the control form and there is another form on the parent page (where the control is placed) the main form gets validated and not the control form. Is there any way to specify that only the control form is to be validated ? (Client side) Thanks. When you submit the page, validation runs on ALL validators on the page. It has no idea that your controls are in a user control....

Validation control in mobile web form
Hi Asp.Net community.Am doing  a project on mobile web form whereby it should support a registration. On the form, each of the textboxes, i have assigned a RequiredFieldValidator.  When i click the button Register while a textbox is left blank, the validator appears but the record is saved to database! Meaning a NULL field is saved. I have used the same code with a web form and same controls , Upon create , validation appears as before but it does not save. Can anyone tell me the reason and the solution why despite validation control appears, it is saved to database?Thank...

Date Validation Control on Web Form
I have a .aspx page in which there are form fields to search by and upon search button click, a datagrid with results is displayed below. I have a date validation control: <asp:comparevalidator id="Comparevalidator" Text="Date must be in mm/dd/yyyy form!" Runat="server" Type="Date" Operator="DataTypeCheck" Display="Dynamic" ControlToValidate="txtMyDate" ErrorMessage="Date in wrong format" ></asp:comparevalidator> But this control allows dates in the following format: mm/dd/yyyy and m/d/yyyy,...

Controlling web control instances on Web Form
I have created a composite control, extending functionality of the Hidden Control. However, I would like to prevent the user from adding this control to the page multiple times. I only want one instance of the control on the Web Form. What setting in my project to I adjust to enable this functionality? I can not find it in any of the books that I have referenced. Is this a setting or is this code that has to be added to the inheriting class. Looks like there is no standard apporach. But I'd consider using static field to count number of created objects and throw exception if second object ...

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...

web form
I have a web form with some text boxes with validation to ensure that data has been entered. I have two buttons one for "submit" and one for "Return to main". When I click on submit - all works OK as it should with asking the user to enter data for the text boxes. However, when I click "Return to main", instead of redirecting to the main page, the validation requirements for the form appear. Here is some of my code... <table> <tr> <td valign="top" style="width: 318px"><asp:TextBox id="txtTextBox1" runat=&quo...

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 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.-...

How to access a control on a web form from anoter web form
hi all I have this scenarios i have two web forms, one called form1 and the other called form2 form1 has a label with id "lbl1" is it possible to access lbl1 from form2, change its text permenantly? thanks.   refer: remember to click "Mark as Answer" on the post that helps you. MinaSamy: hi all I have this scenarios i have two web forms, one called form1 and the other called form2 form1 has a label with id "lbl1" is it p...

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 ...

Web resources about - Validation controls are triggereing other forms validation controls? -

Resources last updated: 1/17/2016 4:04:20 AM