Validation Control question - how to control when validation occurs?

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 occurs so it's not showing errors first time in?  BTW I do a postback on the DDL becuase the formview gets some data populated depending on which item has neen selected.

 
Thank you.
 

0
TwoGoldens
9/6/2006 1:47:46 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

1 Replies
822 Views

Similar Articles

[PageSpeed] 36

It sounds like during a post back, server side validation is running. It happens automatically in submit controls with CausesValidation=true or manually by your code calling Page.Validate(). Perhaps you actually needed to validate something on the first page? If so, perhaps using different Validation Group names for controls on each page would help.
--- 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
1
PLBlum
9/6/2006 5:29:11 PM
Reply:

Similar Artilces:

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

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

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

Using Validation Control When the control to validate is initially hidden
Hi to all, When I used the validation controls (RequiredField Validator)  in initially VISIBLE controls, it works fine. But when the controls i want to validate is initially hidden, it seems that the validation doesn't not work. What do you think is the problem?  By the way, my hidden controls is in a table inside a PopUpPanel which is inside an UpdatePanel. Hope you can help me. Thanks Khrizz   khrizz Hello!! You can use like following: to avoid this condition. protected void button1_Click(object sender, EventArgs e) { &nbs...

validation control in runtime dont recognized control to validate
 i have repeater with textbox and dropdown, according t some value i set visible = true / false to each one of these controlsnow , in some textbox i want to add programaticly a required field to validate this text box and i get the following massage:  "Unable to find control id 'ROOT_UNIT' referenced by the 'ControlToValidate' property of ' ' "here is some code:    Private Const RootUnitControlId As String = "ROOT_UNIT" looping the repeater with repeater item (ri)     ElseIf type = SegmentInfo....

Why validation control validate after...
I am using asp file upload and apply requiredfield validator and it shows an error message when i click on button its work fine but after selectin of file i press again click button the file upload successfully but the error message display again after successfull execution how can i solve this...Remember to click “Mark as Answer” on the post, if it helps you. Hi, What error you encountered? And could you please post some code? You didn't refer to Ajax functionality. BTW if you put fileupload control into UpdatePanel, it is not available. UpdatePanel doesn't support fileupload.Vi...

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

validating .net validation controls using javascript
 I need to validate multiple .net validation groups(a normal group would consist of RequiredFieldValidators, RegularExpressionValidators, ValidationSummary, etc) using javascript.  I am using Page_ClientValidate("GroupName") to validate the groups.  The problem arises when i validate multiple groups.  The validation summary and errors only appear for the last group validated or nothing appears if the last group validated returns true.  I want all validation summaries and errors to appear for all groups that return a false validation.  I'll never va...

Assign a Web user control to a Validation Control
I am trying to add a user control built in 1.1 to a 2.0 web page. The 1.1 user control already has validation built into it. I need to use validation groups on the hosting page. Since I cannot assign a validation group to the user control, the built in validation does not run. Is there any way to make this user control work with validation groups?   How is it that validation is already "built-in"? Can you just duplicate the validation logic in a new validator on your 2.0 page? There is a validator on the the user control: Public WriteOnly Property EnableValidat...

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

Wizard
I have a wizard with a few steps. One of the steps contains a web user control with 3 text boxes. I'd like to validate that these text boxes have data before allowing the user to go to the next step. I tried putting the requiredvalidators inside the web user control - but these arent fired when the Next button is clicked. I tried putting the requiredvalidators on the Step page itself but cant wire them up to the web user control. Whats the correct way to do this ? Hi, Would you please post the code of the ASP.NET? I will be waiting for your feedback. Hong GangHong-Gang ChenMicroso...

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

Web resources about - Validation Control question - how to control when validation occurs? - asp.net.web-forms

Cross-validation (statistics) - Wikipedia, the free encyclopedia
is a model validation technique for assessing how the results of a statistical analysis will generalize to an independent data set. It is mainly ...

Serena Williams eyes history, Caroline Wozniacki craves validation in women's US Open final
As Serena Williams eyes another slice of tennis history, Caroline Wozniacki is craving validation with a watershed US Open final triumph on Sunday ...

Travers Duncan asks High Court to strike down ICAC validation laws
ICAC could be sent back to the High Court as a challenge to new laws validating corruption findings looms.

Adam Scott proclaims Texas win as validation of No.1 ranking
... No.1 golfer, beating American Jason Dufner in the third hole of a play-off at the Colonial event. "It's a good feeling and maybe some validation ...

Hollande to sign gay marriage bill after Constitutional Council's validation
Hollande to sign gay marriage bill after Constitutional Council's validation People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, ...

Marketers, Get Ready for the 'Validation Era'
The public brands included has been engaging in a "friends" arms race. But there are signs that we know we overdid it.

Validation and Uncertainty
What an extraordinary conversation I had recently on Twitter. It started with Neil Killick’s statement that we should not consider our stories ...

Nvidia Icera 410 LTE Modem Passes AT&T Network Validation
... Today's news is a small step and logical precursor toward both goals, Nvidia's Icera 410 LTE and HSPA+ baseband has passed AT&T's network validation ...

Ting’s Q1 Subscriber Growth Suffers from Sprint’s New Unlocking Validation Process
Back in February, Sprint updated the process it uses to validate unlocked devices that customers want to utilize on other carriers or one of ...

[Android M Feature Spotlight] Stricter APK Validation Now Actually Checks If All Of An APK's Files Are ...
While you might file this one under "really? We weren't doing this already?" if you're a security expert, Google has added stricter validation ...

Resources last updated: 11/24/2015 4:08:20 AM